Ubuntu Desktop – Run X11vnc Server at Startup

Going to make this quick because I don’t have any time so…Copied straight from here with a slight modification and it works quite nicely other than the fact that if the x11vnc process dies your screwed. Eventually I will look into running it as a system service but this works for now.

sudo x11vnc -storepasswd /etc/x11vnc.pass

Enter in and then confirm your new VNC Server password and then paste this right into terminal.

echo "start on login-session-start" > /etc/init/x11vnc.conf
echo "script" >> /etc/init/x11vnc.conf
echo "/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" >> /etc/init/x11vnc.conf
echo "end script" >> /etc/init/x11vnc.conf

Reboot.

Leave a Reply