Public
I need to run an X app in a VM which has almost nothing installed, not even "xauth". So the usual "ssh -X" does not work, as it requires xauth. However, I just learned that recent SSH can now do arbitary Unix port fowarding. So one can do
ssh -R 6010:/tmp/.X11-unix/X0 user@host
and then do "export DISPLAY=localhost:10.0" on the VM, and things Just Work™. By forwarding to a TCP port, things like Qt are also tricked into not using /dev/shm/. If you forward to a Unix socket, it will try that and of course fail.
ssh, you are awesome!
ssh -R 6010:/tmp/.X11-unix/X0 user@host
and then do "export DISPLAY=localhost:10.0" on the VM, and things Just Work™. By forwarding to a TCP port, things like Qt are also tricked into not using /dev/shm/. If you forward to a Unix socket, it will try that and of course fail.
ssh, you are awesome!
That's pretty cool!Dec 9, 2014
Why does X in the VM accept your unauthenticated X connections?Dec 10, 2014
Err, I suppose it's the other way around: X outside your VM accepts unauthenticated X connections from apps inside the VM. Did you run xhost +si:localuser:$USER (outside the VM)?Dec 10, 2014
Add a comment...