VNC as a system service.

x11vnc root 0.  I just wana login/out from my gdm over vnc. I want to play on my computer while getting paid hourly at work. I found all the other walkthrews, tutorials, howtos to be annoying and not to the point.

  1. First, disable Desktop Sharing under System -> Preferences -> Remote Desktop.
  2. sudo apt-get install x11vnc
  3. sudo x11vnc -storepasswd yourpasswordhere /etc/x11vnc.pass
  4. sudo nano /etc/X11/gdm/Init/Default
  5. add this line to the bottom above exit  /usr/bin/x11vnc -rfbauth /etc/x11vnc.pass -o /tmp/x11vnc.log -forever -bg -rfbport 5900
  6. sudo gedit /etc/X11/gdm/gdm.conf then search for search for #KillInitClients=true Uncomment KillInitClients and change true to false so you don’t get your session killed after you log in.  
  7. now restart

I stole this tut almost word for word from I don’t mean to steal his credit or anything like that. I've used this personally many times and just wanted to share this because it works amazingly.


vnc as a system service

Many thanks Ech0 it worked fine as soon as I had learnt how to spell. ;)

Ubuntu 8.04 change

This works on 8.04 with the following difference: /etc/X11/gdm/Init/Default is now: /etc/gdm/Init/Default So: sudo gedit /etc/gdm/Init/Default & sudo gedit /etc/gdm/gdm.conf