#!/bin/bash # program myradar # version 1.0 # written by Andrew V. Newman # last modified Tue Tue Mar 2 17:21:01 MST 2004 # shell script to bring up a current local radar # Sets a default URL BASE # NOTE: If you want to change this for your local area, go to # wunderground.com and find the correct URL for your area. # I modified mine quite a bit so as to only show the gif image # with the full delay and number of images available. The only important value # that needs to be changed to get your area but have it look like mine is the # "ABX" in my URL path. For example, switch 'ABX' to 'LOT' to get Chicago. URL="http://www.wunderground.com/radar/radblast.asp?num=6&delay=15&noclutter=0&ID=ABX" # Set the default graphical browser # I like galeon, but it may not be installed on your machine. GUI_BROWSER=/usr/bin/galeon # ---------------------------- # # If you can display a window on your terminal it will # bring up your forecast in a graphical browser if [ $DISPLAY ]; then $GUI_BROWSER $URL 2> /dev/null # Otherwise, it cannot work for you else echo "Sorry cannot bring up a display :(" exit 1 fi # exit cleanly exit 0