Installing and configuring x11vnc on Ubuntu 14.04

Install x11vnc through the software center or apt-get. When installed, it will not start at boot.

There are several ways of doing this, but here is my preferred way (as root):

-create a password file using “x11vnc -storepasswd <password_file>” and provide your password, then chmod 600 <password_file> to avoid anyone reading it but root,

-create the following in /etc/init/x11vnc.conf:

start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamage -repeat -display :0 -auth /var/run/lightdm/root/:0 -forever -shared -bg -o /var/log/x11vnc.log -rfbauth <password_file> -rfbport 5900 -allow <comma_separated_list_of_ip_addresses>
end script

Now let’s see some of the options (and it has a lot of them):

-xkb will allow better clipboard interactions in my experience,

-repeat is allowing keyboard repeating keys (most annoying thing when it doesn’t work),

-forever means even if you disconnect from your session, x11vnc will still be alive,

-shared means several users may be connected at the same time (use this only if you plan to connect multiple users simultaneously to it),

-allow enables to restrict the machines that will be able to connect to vnc, remember, vnc is an open door to your machine.

Reboot. You should be able to connect on the default port 5900 after that.

6 thoughts on “Installing and configuring x11vnc on Ubuntu 14.04

  1. Thank you!!! – After trawling loads of other posts & trying lots of other stuff including the dconf editor, this is the only solution I found that actually worked!!

  2. Thank you ! I finally got it working. for those who are using this within a larger organization with seperate networks : if it does not work upon first login, try to log in using the IP of the target machine, instead of the name.

    Best regards

    Anton

Leave a comment