Native X display support
Overview
In VNC version 4, the VNC server functionality has been split cleanly from the X server, allowing the Xvnc server to be built on almost any platform on which an X server will build.
This also makes it possible to remote the native X server (i.e. the ":0" X display). There are three ways this can be done. For XFree86 version 4 X servers, a loadable module is provided which adds the VNC server functionality. For other X servers it is possible to build a replacement for the native X server binary which is VNC-enabled. A third way is an inefficient but non-invasive VNC server called x0vncserver, which continuously polls any X display, allowing it to be controlled via VNC.
vnc.so module
If your native X server is an XFree86 version 4 server, then the
vnc.so module should be copied to the /usr/X11R6/lib/modules/extensions
directory. It can be enabled like any other module by adding a Load
"vnc" line to the Module section of XF86Config as
shown below:
Section "Module" ... Load "vnc" EndSection
The parameters listed in the Xvnc
manual page can be set as options in XF86Config. Note that options
cannot be set in the Module section of XF86Config—try
the Screen section. Most VNC parameters are optional, but
you will need to set either the PasswordFile or SecurityTypes
options, as follows:
Disable authentication
If your VNC server is running in a secure environment, and you do not want to control access to it, you can disable authentication with the following configuration:
Section "Screen" ... Option "SecurityTypes" "None" EndSection
Enable VNC authentication
To enable VNC authentication, you will need to set a VNC password
using the vncpasswd program:
# vncpasswd Password: Verify:
You will also need to tell the VNC module where the password is stored:
Section "Screen" ... Option "SecurityTypes" "VncAuth" Option "UserPasswdVerifier" "VncAuth" Option "PasswordFile" "/root/.vnc/passwd" EndSection
