Easy VNC control on Linux and Xorg with x11vnc
Here is my first post in English. I hope that my blog can gain a larger audience in that way : I will try to have an English version for every article unless it is about something specifically French. Please excuse my language errors as I am not a native English speaker.
There seems to be a confusion on the term VNC server between Linux and other OSes.
When you run a VNC server on Windows it means that you run software that shares your desktop over the network, in that case the remote computer, the viewer, is called client. On Linux all the VNC server software doesn't share your desktop, it starts a new X session and shares it over network, it's an empty desktop no one can see before connecting to it with a viewer. It may sound obvious, but can be disturbing when you first try to use VNC on Linux.
It is possible to share your X desktop, in a Windows way with x11vnc : install it with your distribution and run it with
x11vnc -display :0
x11vnc will print something like
The VNC desktop is: escher:0 PORT=5900
Now you can simply connect to your desktop with vncviewer on port 5900.
It is even possible to connect the viewer automatically (very useful for bypassing firewalls) with :
x11vnc -display :0 -connect host:port
where host has a listening viewer on port, for example ultraVNC supports this feature.
Notice that it is important to deactivate any 3D software on your desktop as x11vnc obviously cannot transport OpenGL graphics.
It even has a graphical interface, brilliant !
Also notice that it would be very easy to make an automatic remote control script for assisting people on Linux. On your side, open a port in your firewall and run vncviewer in listen mode. On the client side, send him a shell script that checks if x11vnc is installed and runs x11vnc -display :0 -connect you:your-port.