Create a script (randwall.sh
)
nano randwall.sh
# cinnamon-sess|gname-sess|mate-sessPID=$(pgrep -o ".*-sess")export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)gsettings set org.mate.background picture-filename "$(find ~/Pictures/wallpaper -type f | shuf -n 1)"
chmod 755 randwall.sh
Setup cronjob every 5 minutes
crontab -e
*/5 * * * * /code/scripts/randwall.sh >> /code/logs/wallpaper.log 2>&1