Setup a service to rotate random wallpaper on Linux with Systemd.
Requires feh (imager viewer) to do the work.
#! /bin/bash
#
# edit BGPATH to reflect a path to your folder
# with backgrounds
BGPATH="/path/to/backgrounds"
bg=$(find $BGPATH -type f -name "*.jpg" | shuf -n1)
feh --bg-scale "file://$bg"
Save it as rotatebg.sh script in ~/.config directory.
[Unit]
Description=Rotate wallpaper timer
[Timer]
OnCalendar=*:0/10
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.
[Unit]
Description=Rotate wallpaper
[Service]
Type=oneshot
ExecStart=/home/user/.config/rotatebg.sh
#exchange 'user' for your username in above line
Save it as wallpaper.service in ~/.config/systemd/user directory.
systemctl --user enable wallpaper.timer
systemctl --user start wallpaper.timer