You are not logged in.
I have a friend that would like to have his XFCE4 desktop picture auto-rotate based on updated images from a website. It's this one specifically ...
http://www.goes.noaa.gov/ak3.html
Can I do this with a script? An app? If I wget the picture every 5 or 10 minutes and set it as the background, that would work perfect, but I don't know where to start. Maybe there's an option in feh? Just thinking at this point ... what should I do?
Offline
I have a friend that would like to have his XFCE4 desktop picture auto-rotate based on updated images from a website. It's this one specifically ...
http://www.goes.noaa.gov/ak3.html
Can I do this with a script? An app? If I wget the picture every 5 or 10 minutes and set it as the background, that would work perfect, but I don't know where to start. Maybe there's an option in feh? Just thinking at this point ... what should I do?
You could use wget as a crontab job, replacing the same file and restarting feh to refresh the background.
I'm sketching the codes here, but does the image name changes when the image does? Right now it's "ALWV.JPG", but will it change along with the new image?
[EDIT] Sorry, I didn't see the XFCE part. So you don't have to use feh to manage your background, thus making life easier.
Here it is:
Execute this once:
wget http://www.goes.noaa.gov/GIFS/ALWV.JPG
Now you have a ALWV.JPG somewhere in your home directory (probably). Find it and set it as the default XFCE4 background image through the common configuration programs. Do not change the file name.
Run this with bash:
crontab -e
This will take you to the crontab file. Append this line:
*/10 * * * * wget -m -nd http://www.goes.noaa.gov/GIFS/ALWV.JPG & killall -USR1 xfdesktop
And change the 10 to whatever time you want. Save and exit.
Now, every 10 minutes, crontab will fetch the image and restart the XFCE wallpaper program, making it reload the new one.
The "-m -nd" options state that the program will compare image timestamps, download if newer and overwrite the old file.
If any problem occurs, please report. I couldn't test it here.
Last edited by BoppreH (2009-02-10 15:42:12)
Offline
Hi,
you can also use "xfdesktop -reload" instead of "killall -USR1 xfdesktop".
BR,
bsdson.tw
Offline