Better Wallpaper Switcher
After downloading so many awesome backgrounds here, I decided I needed to switch between them hourly. I found a shell script to do it on Michel's page but it gave me errors occasionally and only scanned one directory, so i wrote a new one in Python. I figured someone else might find it useful, so here it is.
(To make it run hourly, run "crontab -e" and put "01 * * * * python /path/to/ranwp.py" on a new line in it, then save)
http://divmod.org/users/washort/ranwp.py
Re: Better Wallpaper Switcher
Quote:
Originally Posted by dash
After downloading so many awesome backgrounds here, I decided I needed to switch between them hourly. I found a shell script to do it on
Michel's page but it gave me errors occasionally and only scanned one directory, so i wrote a new one in Python. I figured someone else might find it useful, so here it is.
(To make it run hourly, run "crontab -e" and put "01 * * * * python /path/to/ranwp.py" on a new line in it, then save)
http://divmod.org/users/washort/ranwp.py
Oh wow! I can't wait to try this! I have tons of great ubuntu wallpapers I want to switch between often! Thank you so much! :)
Re: Better Wallpaper Switcher
Quote:
Originally Posted by dash
After downloading so many awesome backgrounds here, I decided I needed to switch between them hourly. I found a shell script to do it on
Michel's page but it gave me errors occasionally and only scanned one directory, so i wrote a new one in Python. I figured someone else might find it useful, so here it is.
(To make it run hourly, run "crontab -e" and put "01 * * * * python /path/to/ranwp.py" on a new line in it, then save)
http://divmod.org/users/washort/ranwp.py
quite useful. as kassetra i have a lot of cool wallpapers and i'm unable to choose beetwen them
Re: Better Wallpaper Switcher
hi, is there any way to get this script to work in xfce?
Thanks in advance.
Re: Better Wallpaper Switcher
Sweet work dash - thanks much. Is better than the other scripts found on the forums. I did have to figure out the "no gconf module" error - I put the Ubuntu server edition on board and built up X, etc. from there. All was needed to add is python-gconf and away we go! Thanks again.
Re: Better Wallpaper Switcher
Sorry I'm a n00b how do I use this?
Re: Better Wallpaper Switcher
You should follow the instructions "dash" posted,
"To make it run hourly, run "crontab -e" and put "01 * * * * python /path/to/ranwp.py" on a new line in it, then save".
If there are other questions you have, and I'll guess at some here, please say so.
Here are the steps I undertook to make it work:
1) edited ranwp.py for my system. Read it to see how I changed the path:
#!/usr/bin/env python
BACKGROUND_DIRS = ['/home/cmo/Multimedia/wallpapers/']
2) made a text file I called cron.txt by doing in a terminal
touch cron.txt
vim cron.txt (use your favorite editor)
I entered this to the text file:
# change wallpaper interval
*/10 * * * * python /home/cmo/Multimedia/wallpapers/ranwp.py
and I saved it.
3) I put ranwp.py in /home/cmo/Multimedia/wallpapers/
4) Again in a terminal:
crontab cron.txt
crontab -l (to check it).
5) Found I had to add python-gconf to the system and did so. How did I discover that? I read the local system mail I set up to alert me. That mail listed the error.
6) I continue to enjoy "dash"'s work <g>.
Re: Better Wallpaper Switcher
Hey blacktop would you be able to pm me or msg me on aim at hawks864 and possibly help me out with this?
Re: Better Wallpaper Switcher
Re: Better Wallpaper Switcher
Thanks! This helped a lot!