You are not logged in.
Pages: 1
Hey all,
I wrote a small script designed to change my desktop background image in gnome every half-hour.
find "/path/to/wallpapers" -type f | while read wallpaper_path
do
gconftool-2 --type string --set /desktop/gnome/background/picture_filename "${wallpaper_path}"
sleep 1800
done
I haven't needed to yet because I have a pretty large number of pictures in that file, but eventually I think I will put a loop in to keep it running continuously and add the script to my startup.
I was wondering if this is really the best way to perform this task. It works, but I'm guessing that this pausing/infinite-loop design would be inefficent and would take up system resources (although I have not noticed any large impact while running it so far). Is there a better way to do this? I noticed this thread: http://bbs.archlinux.org/viewtopic.php?id=54659. Is using cron a better solution?
Thanks
Offline
ever hear of cron jobs? Just write the switcher and have a cron job take care of the scheduling.
Offline
This should be moved to "General Programming Forum".
Anyway, a cron job is the way to go. Maybe put the script in one of the folders in /etc (cron.hourly, cron.daily, etc)
Offline
That is sort of what I thought. Thanks for confirming my suspicion. I'll try to rework it using cron and post what I have done for others.
Offline
Pages: 1