# Use Cronjobs…

# Use Cronjobs…

Use Cronjobs

To Set Random Wallpaper from UnSplash

To get a random pictures from UnSplash using keywords, and then set the pictures as wallpapers in Cinnamon or Mate, you can use a script file, and call it with crontab.

This website explains how:

For Cinnamon Desktop

In addition to what the website says, modify the unsplash.sh like this to get smooth wallpaper transition: (Replace water,nature with your own keywords)

#!/bin/bash
    wget -O /var/tmp/wallpaper-temp.jpg https://source.unsplash.com/1920x1080/?water,nature
    
    mv /var/tmp/wallpaper-temp.jpg /var/tmp/wallpaper.jpg
    
    gconftool set org.cinnamon.desktop.background picture-uri 'file:///var/tmp/wallpaper.jpg'
    

Type this command:

crontab -e
    

Add this line to run script every 5 mins.:

*/5 * * * * /bin/unsplash.sh
    

Restart cron

sudo service cron reload
    

For Mate Desktop

Use this command in the script instead of the Cinnamon command above:

settings set org.mate.background picture-file '/var/tmp/wallpaper.jpg'
    

⚡️ Follow Freedom Tech

#CronJob #RandomWallpaper #CinnamonDesktop #MateDesktop #Linux #FreedomTech

⚡️ Zap