Automatically Set a Random Wallpaper right after Login


This is just for fun, if you're easily bored with a wallpaper and too lazy to manually pick another, then this is for you.

I gathered this from all across the internet. This not only allows you to set a wallpaper through command line but also a random one :rainbow: not sequential. You can also specify your own filter rule for better control!

Without further ado, append the following line to ~/.profile (that's the home directory, .profile file)

gsettings set org.mate.background picture-filename `ls /home/username/Pictures/Wallpapers/*.jpg | shuf -n1`

Replace /home/username/Pictures/Wallpapers/*.jpg with your own pictures folder and filter rule. Please notice that it's ` not '

Clicky stuff Here (example)

Of course you can use the command anytime you want.

Have Fun! :tada:

######PS: If you found a Blogger entry with the same guide, it's me :slight_smile: unless it's not. I don't steal stuffs, at least not intentionally


It would be better if you just shared the code of the script itself rather than a picture. Just sayin’.

We’re well past the era when users had to replicate code by hand.

I did gave the command in the form of text above if you notice.

I gave the picture example of my .profile cause other lines and contents aren’t important (why would anyone use the same directory and filter rule as mine?) It’s just to prevent confusion where to put the line.