Using VNC as an Individual

The first step to running VNC is to install it. Most modern distributions ship with VNC, but Slackware is an exception to this rule. Most modern distributions ship with a VNC variant known as Tight VNC. Typically, separate client and server packages are available, often called tightvnc andtightvnc-server. Some distributions omit the tight part of these package names, though. Debian calls its VNC client package xvncviewer. If you're not sure if VNC is installed on your system, use whereis to look for the vncviewer and Xvnc files, which are present in VNC client and server packages. (Debian uses xvncviewer rather than vncviewer.) If these files aren't present, look for the appropriate packages in your distribution, or check the original VNC website ( or the Tight VNC website ( Tight VNC provides additional data compression options, which can improve the performance of the VNC protocol. After you install VNC, follow these steps as an ordinary user on the VNC server system:

1. Create a directory called .vnc in your home directory. This directory will house your VNC configuration files.

2. Type vncpasswd. The program prompts you for a password and for a verification of this password. VNC doesn't, by default, use the normal Linux password database. You will need this password to gain entry to the system.

3. Type vncserver. This command is actually a script that performs various checks and then starts a VNC server (using the Xvnc program file) in your name. The program displays some summary information, including a VNC session number:

New 'X' desktop is 1

You should now be able to access the VNC server system, as described in the upcoming section, "Using a VNC Client." When you try this, though, you may run into problems. One common issue is that the server fails to start, or it starts and then crashes. Check for log files in ~/.vnc. These files may include clues to the problem. One common problem relates to font paths; the VNC server is very sensitive about its font paths, and it will crash if you specify font directories that don't exist or that are misconfigured. You can add the -fp option and a comma-separated list of font directories to the command line to work around this problem. Alternatively, you can adjust your configuration files.

A second problem—or series of problems, really—is that various default options may be set strangely. Most configurations use two types of configuration files:

The VNC Startup Script The vncserver script includes within it various options, such as the default desktop size, the default font path, and so on. For the most part, these defaults are equivalent to X server defaults you would set in your local X server's XF86Config file. You can edit this script to change these defaults.

User Configuration Files Most VNC servers use ~/.vnc/xstartup as a user's local startup script. This script may call /etc/X11/xinit/xinitrc or some other local default startup script, or it may launch a bare-bones window manager, such as twm. In any event, you can edit this script much as you'd edit any other X startup script, as described in Chapter 9, "Bypassing Automatic Configurations to Gain Control."

Debian's configuration is unusual because it uses/etc/vnc.conf and -/.vncrc as configuration files for both of these functions. (The file specifies a default startup script file, which you can change if you like.)

0 0

Post a comment