You are not logged in.

#1 2009-02-10 10:40:55

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Make XFCE4 desktop picture auto-rotate

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

#2 2009-02-10 14:57:02

BoppreH
Member
Registered: 2009-02-04
Posts: 47

Re: Make XFCE4 desktop picture auto-rotate

synthead wrote:

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

#3 2009-02-12 03:13:09

bsdson.tw
Member
From: Taiwan
Registered: 2005-05-06
Posts: 161

Re: Make XFCE4 desktop picture auto-rotate

Hi,
you can also use "xfdesktop -reload" instead of "killall -USR1 xfdesktop".
BR,
bsdson.tw

Offline

Board footer

Powered by FluxBB