You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
1.4 KiB
79 lines
1.4 KiB
18 years ago
|
#!/bin/sh
|
||
|
#
|
||
|
# Copyright (c) 2006 by Karl J. Runge <runge@karlrunge.com>
|
||
|
#
|
||
|
# 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/ /./g'`
|
||
|
fi
|
||
|
|
||
|
f="$0"
|
||
|
for t in 1 2 3 4 5
|
||
|
do
|
||
|
if [ -L "$f" ]; then
|
||
|
f0="$f"
|
||
|
f=`ls -l "$f" | sed -e 's/^.* -> //'`
|
||
|
if echo "$f" | grep '^/' > /dev/null; then
|
||
|
:
|
||
|
else
|
||
|
f="`dirname "$f0"`/$f"
|
||
|
fi
|
||
|
else
|
||
|
break
|
||
|
fi
|
||
|
done
|
||
|
dir=`dirname "$f"`
|
||
|
|
||
|
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"
|
||
|
if echo "$dir" | grep '^/' > /dev/null; then
|
||
|
:
|
||
|
else
|
||
|
dir=`pwd`/$dir
|
||
|
PATH="$dir:$dir/$name:$dir/util:$PATH"
|
||
|
fi
|
||
|
|
||
|
SSL_VNC_BASEDIR="$dir"
|
||
|
export SSL_VNC_BASEDIR
|
||
|
|
||
|
STUNNEL_EXTRA_OPTS=${STUNNEL_EXTRA_OPTS:-"maxconn = 1"}
|
||
|
export STUNNEL_EXTRA_OPTS
|
||
|
|
||
|
exec ssl_tightvncviewer.tcl "$@"
|