User`s manual

40 Installing and Using the Axel-VNCviewer
created during the use of Netscape). Alternatively rdesktop software (RDP
client) doesn't need a window manager.
6.5.1 - The RunScriptVNC Script
The RunScriptVNC script first runs the Xvnc daemon, then runs (in a loop) the
dedicated application (binary or script).
The axvnc utility (see Chapter 3.2) automatically creates RunScriptVNC in /etc.
The following gives the content of this script:
DISPLAY=":"$1
export DISPLAY
PORT=`expr 5900 + $1`
GEOMETRY=$2
if [ "$3" = "8" ]; then
BPP="-depth 8 -cc 3"
else
BPP="-depth 16"
fi
/usr/local/bin/Xvnc $DISPLAY -ac -geometry $GEOMETRY $BPP -rfbwait 120000 -rfbport
$PORT -fp unix/:-1 -co /usr/lib/X11/rgb 1>/tmp/axvnclog$1 2>&1 &
sleep 1
/usr/bin/X11/xsetroot -solid grey
shift
shift
shift
CMD=$*
TYPE=`/usr/bin/file $1`
TEXT=`echo $TYPE | grep "text"`
if [ ! -z "$TEXT" ]; then
CMD="/usr/bin/X11/xterm -geometry 170x60-0+0 -e "$CMD
fi
while :
do
REP=`ps -ef | grep "Xvnc $DISPLAY" | grep -v grep`
if [ -z "$REP" ]; then
exit
fi
$CMD
RunScriptVNc is run by
/etc/inittab
. The
/etc/inittab
file is modified to launch a
script for each VNC terminal. Example:
axv1:5:respawn:/etc/RunScriptVNC 1 1024x768 8 /usr/local/bin/runRDP 1>/tmp/axvnclog1
2>&1
axv2:5:respawn:/etc/RunScriptVNC 2 800x600 8 /usr/local/bin/runNS 2 800x600
1>/tmp/axvnclog2 2>&1