[Pkg-libvirt-maintainers] Bug#592858: virt-manager: vnc display doesn't work with zsh

Cole Robinson crobinso at redhat.com
Mon Aug 23 20:44:12 UTC 2010


On 08/13/2010 09:21 AM, Tollef Fog Heen wrote:
> Package: virt-manager
> Version: 0.8.4-7
> Severity: normal
> 
> To set up a tunnel and access remote VNC displays, virt-manager does a:
> 
> ssh -l $USERNAME $HOST 'nc -q 2>&1 | grep -q "requires an argument";if [
> $? -eq 0 ] ; then   CMD="nc -q 0 127.0.0.1 5902";else   CMD="nc
> 127.0.0.1 5902";fi;$CMD;'
> 
> however, this doesn't work if your shell on the remote host is zsh, as
> zsh doesn't expand $CMD.  Using «eval $CMD» works, or you can do sh -c
> "$CMD", but just plain $CMD doesn't work.
> 
> Steps to reproduce should be trivial, but for completeness:
> 
> on a remote host with libvirt running and an existing VM, change the
> shell of the user you are logging in with to zsh.  Try to connect using
> virt-manager.  Observe that you get the error message:
> 
> zsh:1: command not found: nc -q 0 127.0.0.1 5902
> 
> (the port number might be different, of course)
> 

Upstream already had a fix for zsh, but was still broken with tcsh. I
think everything works fine now, I basically just wrapped the whole
block in 'sh -c', and AIUI nobody sets sh to anything but bash or dash,
which are well tested with this code:

http://hg.fedorahosted.org/hg/virt-manager/rev/16fcbf77e47e

Please let me know if that's not sufficient





More information about the Pkg-libvirt-maintainers mailing list