PDF Print E-mail
Written by Batuhan Osmanoglu   
Tuesday, 11 May 2010 19:52

Update Gnome Desktop using an online webcam feed

Working in a lab with no windows is no fun, especially when you spend so much time there that you don't even know when the sun sets. I had a simple solution to that problem, update my Ubuntu desktop with the campus webcam.

This was actually easier than I expected. I simply had to go to one of my previous posts and get the URL for the webcam. Then I wrote a simple scrip to automatically download the image, and display it on my desktop. 
#/bin/bash 
desktopImage="/home/${USER}/desktop.jpg" 
wget -q http://www.rsmas.miami.edu/media/msc-webcam/doccam.jpg -O ${desktopImage} 
gconftool-2 -t string -s /desktop/gnome/background/picture_filename ${desktopImage}

Save the following script as changeDesktop.sh and we are almost done. All we have to do is add the following line to Ubuntu's crontab so that the script runs every so often.

*/20 *  * * *   root    /full/path/to/changeDesktop.sh

Done. Enjoy changing pictures every 20 minutes ;) 

Last Updated on Tuesday, 11 May 2010 20:03