How to use the real-time Earth wallpaper script for Linux

How to use the real-time Earth wallpaper script for Linux

1.Save code part to a file, say change.sh

while [ 1 ]; do
COUNTER=0
while [ $COUNTER -lt 60 ]; do
wget http://www.opentopia.com/images/cams/world_sunlight_map_rectangular.jpg -O world.jpg
temp=$(stat -c%s world.jpg)
if [[ $temp > 1000 ]]
then rm world_sunlight_Wallpaper.jpg
mv world.jpg world_sunlight_Wallpaper.jpg
break
fi
sleep 5
let COUNTER=COUNTER+1
done
sleep 3600
done

2. Create a new folder in your home partition, say wall.
3. Set permissions and run :

$ cd ~/wall
$ cd chmod 777 change.sh
$ ./change.sh

4.Set the image as wallpaper :

gconftool-2 --type string --set /desktop/gnome/background/picture_filename ~/.gnome2/world_sunlight_Wallpaper.jpg

5.Put script to start up :

$ mv /path/to/change.sh /etc/init.d/
$ update-rc.d change.sh defaults

Now the scripts updates the wallpaper for every "3600 seconds" and can be changed as per your wish in the script.

Share this