x11vnc – VNC server uses current X11 session.x11vnc allows one to view remotely and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. In this way it plays the role for Unix/X11 that WinVNC plays for Windows.
Limitations of X11vnc
VNC uses a separate authentication system. It’s not yet integrated with PAM, for example.
Users need to know the X display number to which they can connect.
Unlocking a screen remotely also unlocks it locally.
Install X11VNC in debian
#apt-get install x11vnc
This will complete the installation
Now you need to start the x11vnc server using the following command
-many parameter means that when a connection is terminated it starts listening again for many more incoming connections
After starting vnc session it will give you a warning message telling about you are running x11vnc without password if you want to enable password you can do so and end of that it will provide a desktop number you can connect example you can see as below
the vnc desktop is debiantest:0
debiantest is my machine name
If you want to test your x11vnc you need to install any one of vnc viewers.You can use tight VNC viewer and you can download from here
Now if you want to use password protected VNC sessions you can use any one of the following options
x11vnc -storepasswd password /path/to/passfile
or x11vnc -storepasswd /path/to/passfile
or x11vnc -storepasswd (this will use ~/.vnc/passwd)
#x11vnc -storepasswd ‘secret password’ ~/.clientpasswd
Once the password has been stored you can tell the server to use it using the following command
#x11vnc -rfbauth ~/.clientpasswd
Make sure any -rfbauth and -passwdfile password files cannot be read by untrusted users.
If you want to know all the available command line options check here
Installing VNC Client in Debian
#apt-get install xvnc4viewer
Once it’s installed you can connect to a running server by using:
If invoked with no arguments you’ll be prompted for the host you wish to connect to, and if necessary a password.