How to automatically set a random Unsplash photo as your Ubuntu wallpaper using bash script

Are you easily getting bored from using the same wallpaper to your Ubuntu machine? Here’s an easy way of enjoying a variety of easily interchangeable wallpapers with photos available as public domain, via

All you have to do is create an shell script file (i.e. using the following code and execute it every time you want a “fresh” wallpaper.


wget -O /tmp/wallpaper.jpg
gsettings set org.gnome.desktop.background picture-uri file:///tmp/wallpaper.jpg


(source code originally found at