X-based VNC serverMake sure you've read 'Getting Started' for introductory information.
Xvnc is the Unix VNC server, which is based on a standard X server. Applications can display themselves on it as if it were a normal X display, but they will actually appear on any connected VNC viewers rather than on a physical screen.
So Xvnc is really two servers in one. To the applications it is an X server, and to the remote VNC users it is a VNC server. By convention we have arranged that the VNC server display number will be the same as the X server display number, which means you can use eg. snoopy:2 to refer to display 2 on machine 'snoopy' in both the X world and the VNC world.
Normally you will start Xvnc using the vncserver script, which is designed to simplify the process, and which is written in Perl. You will probably want to edit this to suit your preferences and local conditions. We recommend using vncserver rather than running Xvnc directly, but Xvnc has essentially the same options as a standard X server, with a few extensions. Running Xvnc -h will display a list.
As mentioned in Getting Started , vncserver can be run with no options at all. In this case it will choose the first available display number, start Xvnc as that display, and run a couple of basic applications to get you started. You can also specify the display number, in which case it will use that number if it is available and exit if not, eg:
Run with the -help argument to see the other options. The important ones are as follows:
In general, you can specify standard X server arguments to vncserver, and they will be passed through to Xvnc. Again, Xvnc -help will list its options, including:.
The script ~/.vnc/xstartup is executed after the server starts. If you want to change the window manager used in your VNC desktop, for example, this is where you should do it.
The server also writes log files in the ~/.vnc directory. These can be useful for tracking down configuration problems and startup errors.
Reverse connectionsXvnc can now make reverse connections to a listening viewer (normally connections are made the other way round - the viewer connects to the server). This is done with a helper program called vncconnect. Simply run:
where host is the host where the listening viewer is running. If it's
not listening on the default port of 5500, you can specify
host:port instead. Vncconnect is just a simple X program which
sets a property on the root window - it is Xvnc which actually makes the
connection. Note that the DISPLAY environment variable must be set as
appropriate to control Xvnc - if you run it on an ordinary X server then
nothing will happen. Also note that any feedback about the success or failure
of the connection will appear in the log file for Xvnc rather than on the
terminal where you run vncconnect.
go back to documentation
For comments, feedback, etc, please see the 'Keeping
in touch' page.