diff options
author | runge <runge> | 2006-11-21 21:57:22 +0000 |
---|---|---|
committer | runge <runge> | 2006-11-21 21:57:22 +0000 |
commit | 38b55a056b7c3d74f0cd14d5303268d137ec77a9 (patch) | |
tree | bf0b019112246e0880119ad83fca787cf7cac3b9 /x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc | |
parent | 4a83f87609b9d53b2983806be58ccd02498a5cd3 (diff) | |
download | libtdevnc-38b55a056b7c3d74f0cd14d5303268d137ec77a9.tar.gz libtdevnc-38b55a056b7c3d74f0cd14d5303268d137ec77a9.zip |
rename
Diffstat (limited to 'x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc')
-rwxr-xr-x | x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc b/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc new file mode 100755 index 0000000..a077054 --- /dev/null +++ b/x11vnc/misc/enhanced_tightvnc_viewer/bin/ssvnc @@ -0,0 +1,78 @@ +#!/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 "$@" |