Mike Ramchand's blog, covering mainly JET (Jumpstart Enterprise Toolkit), but with diversions into other stuff, like sailing.. JET Stream

Friday Nov 17, 2006

I've been using "VNC Viewer Free Edition 4.1.1 for X" so that I can remote control other machines in the house, but if the machine I try to connect to is down/unavailable/switched off etc, the vncviewer command kind of hangs and I can't do anything on my desktop (except wiggle my mouse) until it times out after a few minutes. Needless to say, this was annoying me. Wrote a simple script called vncsafe:

#!/bin/sh
ping $1 >/dev/null 2>&1
if [ $? = 0 ]; then
vncviewer $1 &
else
zenity --error --text="$1 is not responding."
fi

Works a treat


tags:

Comments:

Post a Comment:
Comments are closed for this entry.