X11VNC is the popular VNC server for creating remote desktop connection and access remote desktop. It works will almost all the desktop environment available for Ubuntu and Debian based systems. Using remote desktop connection we can connect any remote system and access graphical user interface and work. We can use any available vnc viewer like the tight vnc viewer, real vnc viewer or ultra vnc viewer.
X11VNC can be a better remote support software for you. This tutorial will help you to setup x11vnc server on your Ubuntu, LinuxMint & Debian system and connect using vnc viewer from the client system.
Step 1 – Install X11VNC
X11vnc packages are available under default repositories, So just update default repositories and install.
[email protected]:~$ sudo apt-get update[email protected]:~$ sudo apt-get install x11vnc
Step 2 – Create Password
Now create a password to connect using vnc viewer from client system.
[email protected]:~$ x11vnc -storepasswd Enter VNC password:********* Verify password:********* Write password to /home/rahul/.vnc/passwd? [y]/ny Password written to: /home/rahul/.vnc/passwd
Step 3 – Start X11VNC Server
After successful installation of x11vnc server on your system. Let’s start it using following command. Change the parameters as per your setup.
$ sudo x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/rahul/.vnc/passwd -rfbport 5900 -shared
The VNC server will start on port 5900. In case port 5900 is busy, it will switch to next availale port.
Step 4 – Connect from VNC Clinet
To connect to the server using VNC, you need a VNC client on your system. For this tutorial, I am using ReadVNC viewer on our system. You can use any other client of your choice.
Step 5 – Setup AutoStart on Boot
Finally setup the auto start of x11vnc server on system boot. Create a x11vnc.conf file under /etc/init/ directory using following content.
[email protected]:~$ sudo vi /etc/init/x11vnc.conf
# description "Start x11vnc on system boot" description "x11vnc" start on runlevel [2345] stop on runlevel [^2345] console log respawn respawn limit 20 5 exec /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /home/rahul/.vnc/passwd -rfbport 5900 -shared

you are a time and energy saver.thanks it worked
I tried following all your steps still its not working. When I try to see the VNC in browser it is not working. I tried localhost:5900 in browser?? Its not working??
Hi Ranjith,
What error are you getting? Have you tried with vnc viewer application?
Hi Rahul,
I have X11vnc in docker container and am accessing this vnc server via noVNC on browser.
Now my question is , not able to copy & paste to remote to local vice versa. Is it possible?
if yes let me know.
Nice and works – but if some other user is on the “server,” I can’t login. With other VNC servers I was, in the distant past, able to log in without controlling the user at the console. Is there a way to make this multi-user?
Thanks! Your instructions work!
Hi, Bojangles,
Please follow the below steps.
its working for me.
On Server
Step 1-:
Install the required x11vnc package in ubuntu.
$ sudo apt-get install -y x11vnc
Step 2-:
Create a password for a user.
$ x11vnc -storepasswd
Output-:
Enter VNC Password:
Verify password:
Write password to /home/user/.vnc/passwd? [y]/n y
Password written to: /home/user/.vnc/passwd
Step 3-:
To run the vnc server on every start automatically. We have to open /etc/rc.local file.
$ sudo nano /etc/rc.local
Copy the below line to start vnc session automatically with system startup, paste it the line before the “exit 0”.
sudo x11vnc -xkb -noxrecord -forever -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw &
Thanks, exactly what I was looking for.
Thanks for your reply. I was able to resolve it by moving the password file outside of the home dir as you had specified. I moved it to “/etc” and now it works at the login screen. Thanks again.
Good stuff and exactly what I am looking for! But unfortunately this is not working for me. When I try to connect via VNC to my Linux Mint instance which is at the login screen I get the following error; “password check failed”. But if I sit in front of the computer and login and then try to connect via VNC it works fine. Any ideas why I cannot get this working via the login screen?
Hi,
Use password you created with “x11vnc -storepasswd” command. System password is bit different than it.