Saturday, October 1, 2016

[UbuntuMATE16.04] How to Set a Random Wallpaper at User Login

Open  /home/username , look for  .profile  file.

Append the following line to it:
 gsettings set org.mate.background picture-filename `ls -d ~/wallpapers/* | shuf -n 1` 
(this is a one liner, no line breaks here. i just suck at html)

Replace  ~/wallpapers/  to your wallpapers directory.

For GNOME desktop environment:
replace  org.mate.background picture-filename 
with  org.gnome.desktop.background picture-uri 
(I've never tried this myself though)

No comments:

Post a Comment