Remote desktop support
There’s a long standing request on the Mir github asking for “remote desktop support”. One possible solution is X-forwarding over ssh:
ssh -XC <login@remote> sh -lc 'egmde --shell-enable-autostart'
But there are performance (and other) issues with X forwarding.
VNC
One of the protocols mentioned in the request is VNC which has some potential for better performance. While using Xfvb
for some testing, I realized that there was also a possibility of using this with x11vnc
to set up a VNC server.
I’m going to describe how to do this while tunneling the VNC connection over ssh. There are obviously other options for those familiar with the technology.
The server
There are some pre-requisites: the server needs an ssh server, egmde
, Xvfb
, and x11vnc
installed, but with these in place and a small wrapper script using the shell’s “login” setup:
I’ve been testing with a server called “octopull-desktop”, but clearly you can use whatever ssh login you need (e.g. for a VM it might be something like “-p 1022 alan-griffiths@localhost”.
$ ssh octopull-desktop -- cat ~/bin/egmde-login
#!/bin/sh -l
exec egmde
The client
The client system needs ssh
and gvncviewer
installed.
To start the VNC server and tunnel the VNC connection over SSH we use the following incantation:
ssh -T -L 5900:localhost:5900 octopull-desktop -- x11vnc -create -localhost -cursor none -env FD_PROG=~/bin/egmde-login -gone \'killall Xvfb\'
And to connect:
gvncviewer localhost
This will bring up a VNC viewer with the egmde
desktop running on the host system.