#!/bin/sh # # Copyright (c) 2006 by Karl J. Runge # # ssl_vnc_gui: # # A wrapper for ssl_tightvncviewer using a tcl/tk gui. # # See ssl_tightvncviewer for details. # if [ "X$XTERM_PRINT" != "X" ]; then XTERM_PRINT="" cat > /dev/null fi if [ "X$1" = "X-bg" ]; then shift $0 "$@" & exit 0 fi PATH=$PATH:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/openwin/bin export PATH SSL_VNC_GUI_CMD="$0 $*" export SSL_VNC_GUI_CMD SSL_VNC_LAUNCH=$SSL_VNC_GUI_CMD export SSL_VNC_LAUNCH # work out os.arch platform string and check for binaries: # name=$UNAME if [ "X$name" = "X" ]; then name=`uname -sm | sed -e 's/ /./'` fi if [ -L "$0" ]; then d=`dirname "\`ls -l "$0" | sed -e 's/^.* -> //'\`"` if echo "$d" | grep '^/' > /dev/null; then dir="$d" else dir="`dirname "$0"`/$d" fi else dir=`dirname "$0"` fi if [ ! -d "$dir/$name" ]; then echo "cannot find platform dir: $dir/$name for your OS:" uname -sm echo "you can set the \$UNAME env. var. to override the setting." exit 1 fi # Put our os.arch and other utils dirs at head of PATH to be sure to # pick them up: # PATH="$dir:$dir/$name:$dir/util:$PATH" SSL_VNC_BASEDIR="$dir" export SSL_VNC_BASEDIR STUNNEL_EXTRA_OPTS=${STUNNEL_EXTRA_OPTS:-"maxconn = 1"} export STUNNEL_EXTRA_OPTS exec ssl_tightvncviewer.tcl "$@"