How to set up an active desktop in 6 lines of Shell
This is my favourite Shell script.
It illustrates the advantages of having a programmable
The first webcams
came out in the mid 1990s
when I was doing my postgrad in England.
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:
lynx -reload -source $url > $file
xv -root -quit -max $file
- This was the Irish Times webcam
(on their old domain
The domain is sold
and the webcam is
is a command line browser.
It can be used to make HTTP requests from scripts.
This was used to set background image on X-windows systems.
The command to do this in general depends on what GUI you are using.
DCU Linux uses the GNOME GUI.
means sleep for this number of seconds
(1200 = 20 mins)
- What happens if no "sleep" command?
- I say "6 lines of Shell" because it would be if you scrap the first 2 lines and
hard-code the url and file.
Live webcam view of
From Aberdeen City Council
- launch it in background:
- to find it:
ps with options
- to stop it: kill PID
- or log off
To set background image in GNOME 3:
gsettings set org.gnome.desktop.background picture-uri "file://$file"
needs to be the absolute path of the file.
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"