#!/bin/sh set -x if [ "$1" = "--esmf" ] then if [ "`uname -n`" = foobar ] then echo Using zebedee zebedee -f /usr/lib/zebedee/vncviewer.zbd esmf.ess.uci.edu:5901 else echo Setting up localhost:3000 for esmf.ess:5901 # blowfish is faster encryption ssh -c blowfish -f -L3000:esmf.ess.uci.edu:5901 esmf.ess.uci.edu \ sleep 999999 vncviewer -shared localhost:3000 fi elif [ "$1" = "--nsc-1" ] then if [ "`uname -n`" = foobar ] then echo Using zebedee zebedee -f /usr/lib/zebedee/vncviewer.zbd nsc-1.nacs.uci.edu:5900 else echo Setting up localhost:3000 for esmf.ess:590. # blowfish is faster encryption ssh -c blowfish -f -L4000:nsc-1.nacs.uci.edu:5900 \ nsc-1.nacs.uci.edu sleep 999999 vncviewer -shared localhost:4000 fi elif [ "$1" = "--dcs" ] then # the VNC that ships with RHEL 3 for opteron is not particularly # stable. However, the 32 bit VNC I got from RealVNC works well. # It lives in /usr/local/bin on dcs.nac. PATH=/usr/local/bin:$PATH export PATH if [ 1 = 1 ] then # foobar is my home machine. It's on a lower bandwidth link, and # zebedee gives better compression. Also, my linksys DSL router is # broken; it won't allow ssh between two linux hosts. echo Using zebedee if [ -f $HOME/lib/vncviewer.zbd ] then zebedee -f $HOME/lib/vncviewer.zbd dcs.nac.uci.edu:5901 else zebedee -f /usr/lib/zebedee/vncviewer.zbd dcs.nac.uci.edu:5901 fi else echo Setting up localhost:3001 for dcs.nac:5901 # blowfish is faster encryption ssh -c blowfish -f -L3001:dcs.nac.uci.edu:5901 dcs.nac.uci.edu \ sleep 999999 vncviewer -shared localhost:3001 fi elif [ "$1" = "--home" ] then if [ 1 = 1 ] then # this is fast, but then I have to open a bunch of ports on my # firewalls echo Using zebedee # zebedee should fire up a vncviewer on the correct port # automatically if [ -f $HOME/lib/vncviewer.zbd ] then zebedee -f $HOME/lib/vncviewer.zbd `home-address`:5901 else zebedee -f /usr/lib/zebedee/vncviewer.zbd `home-address`:5901 fi else echo Setting up localhost:3002 for `home-address`:5901 using ssh # last time I tried this, it wasn't working. Zebedee is very # nice though, even over this slow link. It's not full color # though # blowfish is faster encryption. #ssh -c blowfish -f -L3002:root@`home-address`:5901 root@`home-address` \ # sleep 999999 #vncviewer -shared localhost:3002 ssh -v -c blowfish -f -L3002:root@`home-address`:5901 root@`home-address` \ sleep 999999 vncviewer -shared localhost:3002 fi elif [ "$1" = "--server" ] then zebedee -s -f $HOME/lib/vncserver.zbd else echo Usage: $0 '[--esmf|--dcs|--server]' 1>&2 echo The --server option is only required for zebedee exit 1 fi