1. sudo gedit
2. copy this, but replace /home/ben/wallpaper/ with the directory where you have your wallpapers:
#!/bin/bash
# Set your folder with the pics
picsfolder="/home/ben/wallpaper/"
# Go to your folder with the pics
cd "$picsfolder"
# Get the name of a random file
randomfile=`ls *.jpg *.png |sed -n $((RANDOM%$(ls *.jpg *.png |wc -l)+1))p`
# start of gconftool command and set the desktop
gconftool-2 -t str --set /desktop/gnome/background/picture_filename "$picsfolder$randomfile"
3. save as changewallpaper.sh in /bin
4. 'sudo chmod +x /bin/changewallpaper.sh'
5. 'crontab -e'
6. add these lines:
*/15 * * * * changewallpaper.sh
@reboot changewallpaper.sh
7. save and exit
And that should be it. At least it was for me. That changes the wallpaper every boot and every 15 minutes. I also added a custom application launcher to my panel with the command '/bin/changewallpaper.sh' and I can click that button to randomly select a new wallpaper if I don't like the current one. Oh, and I like http://interfacelift.com/ for good wallapapers. Also, I didn't write that little script, I stole it from this thread: http://ubuntuforums.org/showthread.php?t=329164&highlight=random+wallpaper
ben
Ahhh...imagining that irresistible "new car" smell?
Check out new cars at Yahoo! Autos.
No comments:
Post a Comment