PDA

View Full Version : [ubuntu] Changing desktop background based on weather



davidryder
March 9th, 2009, 05:51 AM
Anyone know of any applications capable of doing this?

dusan.saiko
March 16th, 2009, 05:18 AM
I think that is quite custom request, but I guess this can be done quite easily.

You can make a little script, which would:
- download the weather info from web, parse it, check for defined conditions (e.g. is it raining ?)
- select a background image according to the evaluation of the weather
- set the background using gconftool-2
- schedule the script in cron to run each lets say 20 minutes


example command for changing background (for Gnome)

gconftool-2 -t str --set /desktop/gnome/background/picture_filename /path/pic.png

amadeus266
March 16th, 2009, 05:21 AM
I think that this is a cool idea! I have seen other programs that change the wallpaper according to the time of day but not according to the weather. I'm interested and will be watching. I'll post here if I come up with any ideas.

blackened
March 16th, 2009, 05:24 AM
The weather data can be had from weather.com, based on locale, in xml format. Go there and sign up for the SDK to get started.

binbash
March 16th, 2009, 08:31 AM
Yup the weather data can be pulled from weather.com like conkyforecast and instead of daylight itis possible the changethe wallpaper via this.I am also looking for a script for this :)

kerry_s
March 16th, 2009, 10:19 AM
you could try modifying the time of day script:
http://joeamined.wordpress.com/2008/02/15/automatically-changing-wallpaper-relatively-to-daytime-in-ubuntu/