From: Alex
> [demime 0.97b removed an attachment of type application/octet-stream
> which had a name of DOVNC]
From: "Seth Kneller" <[EMAIL PROTECTED]>
Subject: RE: Argh!  HowTo inetd ...
> Nice Instructions, however, you should have pasted the script into the
> body of the message.
Sigh ... here it is.

#! /bin/bash
#
#       VNC spawning script
#       ===================
#                                       (c) Quantum Magnetics 2001, GPL
#
##########################################################################
#
# Find out which session

session=${1:-0}

if test $session -lt 0
then    exit 1
fi

if test $session -gt 0
then    java="-httpd /usr/share/vncserver -httpport 580$session :$session"
        logfile=/var/log/vnc-$session.log
else    java="-inetd"
        logfile=/dev/null
fi

##########################################################################
#
# Do something sensible with log files

if test -f $logfile
then    if test -f $logfile.gz
        then    rm -f $logfile.gz
        fi
        gzip $logfile
fi

##########################################################################
#
# Find out which XDM to contact

case "$session" in
  2)
        target="-indirect xdmserver"
        ;;
  1)
        target="-query appserver"
        ;;
  *)
        target="-query ${2:-localhost}"
        ;;
esac

##########################################################################
#
# Actually start the server

exec /usr/bin/X11/Xvnc $target $java \
        -geometry 800x600 -depth 16 -deferglyphs 16 -dpi 100 \
        -dontdisconnect -nevershared -once -terminate \
        2> $logfile
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------

Reply via email to