SSH and a X session


by David Lutton, 2013/03/11

Working example of Xnest and SSH from a VM.

ssh -X on to the host.
First install Xnest and a destop manager lubuntu-desktop.
lubuntu-core might be sufficient, need to check.

Make a file, in this example, called .xinitnest with the contents:

#!/bin/sh
exec /usr/bin/lxsession -s Lubuntu -e LXDE
Then run:
xinit ~/.xinitnest -- `which Xnest` :5 -geometry 1024x768
To test it.

This can be run as a one liner as:
ssh $HOST -X "xinit ~/.xinitnest -- \`which Xnest\` :5 -geometry 1024x768" # :5 is arbitary, so is the geometry.

Reference material:
The Gentoo wiki had this and I also found this. Which is more focused on getting multiple X sessions running.