VNCviewer trick

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.
About

mramcha

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today