top of page

Background roulette, a wallpaper switcher Raspbian Stretch

Updated: Jan 26, 2019

DISCLAIMER: I suck at linux and rely on the abilities of much smarter people.

I spent the better part of three hours trying to find someone who figured out how to get the Pi to auto change the wallpaper after a set time interval. I tried several methods that used cron, but to no avail. Not that there was anything wrong with them, I just couldn't get them to work with my noob skills. I could run the scrips manually and they worked fine but I couldn't get it to work with cron. I finally found a solution over at Radioactive Bytes. The other advantage to this one (besides not relying on cron) is it's easy to change the time interval.

I'm including the contents here for myself.


The first script picks a random wallpaper from your wallpapers directory and sets it as wallpaper.

The second script runs the first script every specified time.

Both these scripts should be put in /usr/bin/


Save this one as /usr/bin/rotator

after saving, run “sudo chmod +x /usr/bin/rotator”

And save this one as /usr/bin/autowall

then run “sudo chmod +x /usr/bin/autowall”

After that, add this line to your ~/.config/lxsession/LXDE/autostart to automaticly run the script at startup.

@autowall

My Note: The autostart file is now located here --> /etc/xdg/lxsession/LXDE-pi/autostart

21 views0 comments

Recent Posts

See All
bottom of page