wallpaper changer script for MATE

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Bender72
Level 1
Level 1
Posts: 37
Joined: Mon Jul 18, 2016 8:22 pm

wallpaper changer script for MATE

Post by Bender72 »

Just wanted to share this. I like to change my desktop wallpaper automatically. I tried Variety for a while, but it made my system unstable (it caused my desktop to freeze regularly.) On top of that, Variety feels like overkill - I just wanted the core functionality of regularly changing the background to a randomly selected picture. I used the script posted by Trapper333 in

https://community.linuxmint.com/tutorial/view/997

as a base but used find instead of ls to recurse through subdirectories.
#!/bin/bash
while true;do
DIR="{your picture path}"

# Command to Select a random jpg file from directory recursively
PIC=$(find $DIR -name "*.jpg" -type f | grep jpg | shuf -n1)

# Set Background Image
gsettings set org.mate.background picture-filename "$PIC"
sleep 300
done
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “MATE”