Setup a service to rotate random wallpaper on Linux with Systemd.
Requires feh (imager viewer) to do the work.

1. Create shell script to set desktop background

 #! /bin/bash
 # edit BGPATH to reflect a path to your folder
 # with backgrounds
 bg=$(find $BGPATH -type f -name "*.jpg" | shuf -n1)
 feh --bg-scale "file://$bg"

Save it as script in ~/.config directory.

2. Create Systemd timer

Description=Rotate wallpaper timer


This will change background every 10 minutes. For some other timeing change value accroding to format *:0/minutes. For more info see manual.

Save it as wallpaper.timer in ~/.config/systemd/user directory.

3) Create Systemd service

Description=Rotate wallpaper

#exchange 'user' for your username in above line

Save it as wallpaper.service in ~/.config/systemd/user directory.

5) Enable service

 systemctl --user enable wallpaper.timer

6) Start service

 systemctl --user start wallpaper.timer