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
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>
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.