Archive for July, 2012

Simple script for changing wallpaper using RSS feed

Monday, July 16th, 2012

Just had the idea to change the wallpaper of my desk according to an RSS feed.

Here’s the shellscript:

IMGURL=$(wget -q -O- "" | grep -o 'src="[^"]*' | grep -m 1 -o '[^"]*$')
LOCALFILENAME=$(echo $IMGPATH/$(date +"%Y%m%d").jpg)
gsettings set org.gnome.desktop.background picture-uri file:///$LOCALFILENAME

For this example, I used the RSS feed from (o.O)
The command in the last line depends on your distribution, this one works for newer Ubuntus. You probably want to run this script via cron or rc.local to get the new wallpapers regularly.

Have fun!