# Virtual Network Computing
from ORL

## X-based VNC server

Xvnc is the Unix VNC server 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 it 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 can edit this to suit your preferences and local conditions. We recommend doing this 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 us that number if it is available and exit if not, eg:

`vncserver :13`

Run with the `-help` argument to see the other options. The important ones are as follows:

> `-name` name
>   Each desktop has a name which may be displayed by the viewer. It defaults to 'X' but you can change it with this option.
> `-geometry` width `x` height
>   Specify the size of the desktop to be created. By default this will be slightly smaller than your current X display, if set, otherwise 1024x768.
> `-depth` depth
>   Specify the pixel depth in bits of the desktop to be created. By default this will be the same as your current X display, if set, otherwise 8.
> `-pixelformat` format
>   Specify pixel format for server to use (BGRnnn or RGBnnn)

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:.

> `-economictranslate`
>   The server normally uses a lookup table for translating pixel values when the viewer requests a different format from the native one used by the server. This can use up to 256Kbytes per connected viewer, so if you have many viewers you may wish to specify this option which will save memory at the expense of a little bit of speed. Only relevant for 16-bit-deep desktops.
> `-cc` n
>   Sets the colour Visual class used by the server. Some X applications don't cope too well with the TrueColor visual normally used by an 8-bit-deep Xvnc. You can make the server use a PseudoColor visual by specifying `-cc 3`.

go back to documentation

For comments, feedback, etc, please see the 'Keeping in touch' page.
Copyright 1998 - The Olivetti & Oracle Research Lab