Set random unsplash image as wallpaper
28 September 2019

Lorem picsum is a great website to get a random image from Unsplash. It even lets you choose a size. Which begs to be used as the source of wallpapers.

Ubuntu (gnome)

wget https://picsum.photos/1366/768/\?random -O ~/wallpaper.jpg && gsettings set org.gnome.desktop.background picture-uri ~/wallpaper.jpg

We’re using wget to download an image of size 1366x768 at ~/wallpaper.jpg and then setting it via gsettings which is the gnome-way.

To change your wallpaper every hour, add this to crontab

0 * * * * wget https://picsum.photos/1366/768/\?random -O ~/wallpaper.jpg && gsettings set org.gnome.desktop.background picture-uri ~/wallpaper.jpg