Setting up VNC for users
automatically
The default
vncserver script creates a $HOME/.vnc/xstartup file that runs the twm
window manager, which is useless for most purposes. Ideally, the system
administrator should modify the vncserver script to use the system
default desktop. Many sysadmins fail to do this. Others forget to redo
the fix when updating to a new version of VNC.
To work around this problem, BIRCH provides a script called 'vncsetup'.
To use this, the BIRCH administrator should create a global xstartup
file in $BIRCH/local/admin/xstartup. If this file exists, vncsetup will
check for the existence of $HOME/.vnc/xstartup. If that file is not
found, the BIRCH xstartup file will be copied to the user's .vnc
directory. If the user already has an xstartup script, then vncsetup
will do nothing.
The BIRCH 'newuser' script automatically runs vncsetup, so that as soon
as a user sets up their account for BIRCH, they will also have access
to vnc, using the specified desktop.
If you want BIRCH to automatically create a working .vnc/xstartup file
for each new user, simply create a $BIRCH/local/admin/xstartup file,
and make sure it is world-readable. For example, on most Linux
and Solaris systems, the following file will run a GNOME desktop in vnc:
#!/bin/sh
gnome-session
&
Note: The
global xstartup file must be world-readable, and should probably be
user-executable ie. chmod 700 xstartup. It is not necessary, since the
vncsetup script will automatically run chmod 700 after copying the file
to the user's .vnc directory. However, it couldn't hurt to give
the file the correct permissions to begin with.
Please send suggestions of comments
regarding this page to
frist@cc.umanitoba.ca