Skip to content

Instantly share code, notes, and snippets.

@HusseinElMotayam
Last active January 26, 2024 19:50
Show Gist options
  • Select an option

  • Save HusseinElMotayam/fe39f7e2d7a55e182d503fd793cb7aa2 to your computer and use it in GitHub Desktop.

Select an option

Save HusseinElMotayam/fe39f7e2d7a55e182d503fd793cb7aa2 to your computer and use it in GitHub Desktop.
Bash script to fetch random wallpapers from Unsplash and set it on Ubuntu.
#!/bin/bash
wget -O /tmp/wallpaper.jpg https://source.unsplash.com/3840x2160/?wallpapers
gsettings set org.gnome.desktop.background picture-uri file:///tmp/wallpaper.jpg
gsettings set org.gnome.desktop.screensaver picture-uri file:///tmp/wallpaper.jpg
# Don't forget to make it executable via: chmod +x random-wallpaper.sh
# To schedule every 10 minutes:
# Run: crontab -e
# Add the following: */10 * * * * /path/to/random-wallpaper
# Save
@virus-found
Copy link
Copy Markdown

Thank you for the wonderful source of random backgrounds!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment