Set Ubuntu desktop background from Unsplash

I love having inspiring desktop background while I work. Often I leave a monitor free of anything, just to admire a wonderful photo.

Unsplash is the perfect source for free stock photos, so I thought to set up a script to fetch a random image from Unsplash and set it as the desktop background on Ubuntu.

I was going to create a custom PHP application, but then I found Unsplash.it so I created this simple bash script:

#/bin/bash

wget -O /tmp/wallpaper.jpg https://unsplash.it/2560/1440/?random
gsettings set org.gnome.desktop.background picture-uri file:///tmp/wallpaper.jpg

You can put this in your ~/bin/ folder, or set a crontab to change it automatically for you.

Leave a Reply

Your email address will not be published. Required fields are marked *