Dr. Mark Humphrys

School of Computing. Dublin City University.

Online coding site: Ancient Brain

coders   JavaScript worlds

Search:

Free AI exercises


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

Here is a Shell script I wrote in the 1990s when the first webcams came out. I was then outside Ireland, doing my postgrad in England.

I wrote this script to turn my desktop background into a live webcam 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.

This illustrates the advantages of having a programmable system.




 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


Notes





Live webcam view of Aberdeen, Scotland.
From Aberdeen City Council.




Usage




To set background image in GNOME 3

To set background image in GNOME 3:
   
 gsettings set org.gnome.desktop.background picture-uri "file://$file"

Notes:



Old: To set background image in GNOME 2

To set background image in GNOME 2:
   
  gconftool-2   -t str   -s /desktop/gnome/background/picture_filename   $file
  gconftool-2   -t str   -s /desktop/gnome/background/picture_options    "stretched"     

Notes:


ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.      New 250 G VPS server.

Note: Links on this site to user-generated content like Wikipedia are highlighted in red as possibly unreliable. My view is that such links are highly useful but flawed.