From LedHed's Wiki
Jump to: navigation, search

Setting up X11VNC server under Ubuntu 10.04 This is a simple guide on setting up X11VNC on a system running Ubuntu 10.04 in a headless configuration. Good Luck, and YMMV.


Credit

I got 99% of this from someone elses work, All I did was alter the init script by passing the -24to32 argument. See references section


x11vnc

Install x11vnc

sudo apt-get install x11vnc

OR compile x11vnc from source: http://www.karlrunge.com/x11vnc/

Edit GDM init script

sudo nano /etc/gdm/Init/Default

Add on the second to last line

/usr/bin/x11vnc -xkb -rfbauth /etc/x11vnc/passwd -o /var/log/x11vnc.log -bg -forever -24to32

OR if you compiled from source, add the following line

/usr/local/bin/x11vnc -xkb -rfbauth /etc/x11vnc/passwd -o /var/log/x11vnc.log -bg -forever -24to32

Create a log file

sudo touch /var/log/x11vnc.log

Create a password file

sudo mkdir /etc/x11vnc
sudo touch /etc/x11vnc/passwd
sudo x11vnc -storepasswd /etc/x11vnc/passwd

Follow the commands to store your password. Alternatively, if you do not wish to use a password, do not run this line and remove the -rfbauth /etc/x11vnc/passwd section from /etc/gdm/Init/Default

Restart GDM

sudo restart gdm

You now have a fully configured, headless VNC setup. Congratulations! Please note that your VNC session will end whenever you log out of GDM, this is a problem with GDM killing the X11 session. X11VNC will start up again with the new X11 session at the login screen, so nothing to worry about, just reconnect!


Reference

http://home.brooksaar.com/linux/x11vnc.html