14.4 The vncserver Script
The vncserver script is a wrapper for Xvnc, designed to be run by users. It provides a
password-protected, persistent server; the user may connect to the server, disconnect,
move to a different machine, and reconnect.
This script first checks to see whether the password file ~/.vnc/password exists; if not,
it runs vncpasswd to create it, prompting the user for the password value. It then
searches for a free display number and sets the display geometry and depth to match
the current screen size and depth (on the display on which the script is run, if one is
present). The server number is reported to stdout, and Xvnc is started along with the
clients specified in ~/.vnc/xstartup (default settings are copied to this file if it is not
already present). The internal mini-web server in Xvnc is also activated by default.
The default clients started by xstartup are pretty lame, so you will probably want to
change ~/.vnc/xstartup to read the following:
$!/bin/sh
unset SESSION_MANAGER
/etc/X11/xinit/xinitrc
These lines are present in the default RealVNC version of the xstartup file, but are
commented out; they will start a normal session for your system (typically KDE or
Gnome).
Pages:
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307