Mate Desktop: Change Wallpaper Every N Minutes

Oct 19, 2020

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

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.