Wednesday, February 18, 2015

Install xRDP with Vino and x11vnc on Xubuntu 12

I just had so much trouble configuring RDP on my upgraded server which now boasts of having Ubuntu 12.04, a live update from Trusty. It looks easy as doing:
sudo apt-get install x11vnc xrdp

I googled a bit until I found this guide, written by Seb Maynard:
sudo x11vnc -storepasswd /etc/x11vnc.pass
You need to specify your own password at the prompts above! ;)
 Put this in /etc/init/x11vnc.conf :
start on login-session-start
script
/usr/bin/x11vnc -xkb -auth /var/run/lightdm/root/:0 -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -forever -bg -rfbport 5900 -o /var/log/x11vnc.log
end script
Reboot!
It should have been easy as the steps described above but I have one problem: I have vino installed and I wanted to use it as well! But vino uses 5900 by default, so I needed to change it to 5901.

Another google search and I found this:
gsettings set org.gnome.Vino alternative-port 5901
gsettings set org.gnome.Vino use-alternative-port true

So I edited my /etc/xrdp/xrdp.ini, assigned vino to 5901 and x11vnc to 5900 and its finally done! But a word of warning: its really not as easy as it seems! :)

By the way, if you want another way to start x11vnc at graphical login, look here! :)