How to set up an active desktop in 6 lines of Shell


This is my favourite Shell script or batch file ever. It illustrates perfectly the advantages of having a programmable system.

When I was doing my postgrad work in the UK around 1995 I used to run this little Shell script to turn my desktop background into a live view of Dublin, that would run all day long.

The sun would slowly rise and set in my background, as I worked away in the foreground:



 url="http://images.ireland.com/webcam/liveview.jpg"
 file=dublin.jpg

 while true
 do
  lynx -reload -source $url > $file
  xv -root -quit -max $file
  sleep 1200
 done



O'Connell Bridge, Dublin, right now.
From The Irish Times.
Image size 100 k. Repeated requests for such size file not such a problem now as they were in the 1990s, but still use caution.



O'Connell Bridge, Dublin, right now.
From Dublin City Council.
Image size 20 k.