Why Perl here ?

Dr. Joel M. Hoffman joel "at" exc.com
Fri, 27 Mar 1998 13:57:00 +0000

>Does this mean you have a working bourne shell vncserver script and if so
>would you care to post it somewhere ?

I use a bourne shell script to launch Xvnc, never having learned Perl
properly.  It's not fancy, not as elegant as the perl script that
comes with Xvnc, but here's what I use:

# vncserver.
# This only works if you already know the DISPLAY you want to use.
# The pid gets put in ~/.vnc/pid, so you can use:
#  kill `cat ~/.vnc/pid` to kill Xvnc.

# Set the display here:

# set the fontpath here:

# 16 bpp.  You might want to use 8.  (Does 8 even work?)

# Set the geometry here

#Where do you keep your passwd file? [YOU MUST SET THIS!]

#Do you use http?  [I don't --- I can't get the Java stuff to compile.]

#Other options go here
OPTS="-co /usr/lib/X11/rgb -rfbauth $AUTH -httpd $HTTP"

/usr/X11R6/bin/Xvnc -fp $FONTPATH $DISPLAY -depth $DEPTH -geometry $GEO $OPTS &
echo $! > /acc/joel/.vnc/pid
sleep 3

/usr/bin/X11/xsetroot -solid grey

/usr/bin/X11/fvwm -disp $DISPLAY &
sleep 1

# no need to launch xterms, because you can do that from within fvwm.