4.1 Attaching a VNC server to an X11 server
There are mainly two ways to do this. If the objective is to share the physical desktop environment of an X11 server via
VNC, then either vino or x11vnc. vino is more Gnome specific, while x11vnc is not desktop environment
sensitive.
x11vnc can be run without any arguments. However, it is usually started as “x11vnc -display :0 -shared -forever :0”.
Let’s take a look at the arguments:
- -display :0
This means that x11vnc should attach to the X11 display :0, which means display zero of the local machine.
- -shared
This means that the display can be shared if multiple X11 clients connect to the server. Use this option with
care!
- -forever
This means that x11vnc should not exit when a client disconnects. Instead, keep the VNC server running and
listening for more incoming connections.
- :0
This designates to use VNC port 0. VNC ports start at 5900, so port 0 means exactly port 5900 (port 1 means
5901 and etc.). This means x11vnc will listen to port 5900 for incoming connections from VNC clients.