Geektool script to show the ping time to your home machine

October 06, 2005

Reading time ~1 minute

Here’s a Geektool command to show the “network distance” to a particular machine on your desktop all the time. I have the distance to my home server in the top left corner of my screen all the time.

Go to the Geektool preference pane and add a new entry. Mine is called “ping home”

Set the entry type to “Shell”

Paste the following into the Command textbox:

PING=`ping -q -c 1 $HOST`
if [[ $? -eq 0 ]] ; then
    TIME=`echo $PING |tail -1 | cut -d/ -f 5`
    echo -n ${TIME}ms away from $HOST
    exit 0
    echo -n $HOST could not be reached
    exit 2

Change the value of HOST on the first line to the hostname of the server you want to ping. (Hint for writing your own scripts: use Option-Return to insert a newline).

Switch to the “Colors and font” tab and choose something nice. I use Gill Sans, in white because my desktop backgrounds are usually dark. No frame, no shadow on the window.

Switch to the “Text” tab, turn on drop shadow, select left alignment of text.

On the “Icon” tab, check “Show icon”, use the default success and failure icons, and pick the left, centered icon alignment.

Drag the window on your desktop to the top left and you’re done.

If the network is working, you’ll get something like this:

Picture 1-1

If not, you’ll get this:

Picture 2-1

Update: JAW Software is hosting a more Tiger-friendly version of Geektool. The changes will hopefully make it to the official version soon.

MINI F54 (Clubman) rear seat repair

I had a minor issue with the centre rear seat of my MINI a few weeks ago. I pulled the catch so that I could drop down the middle section...… Continue reading

LS400 ride height sensor repair

Published on November 23, 2009

LS400 centre console illumination repair part 2

Published on November 22, 2009