What is Nostr?
Freedom Tech
npub1fkl…j48l
2024-06-27 20:38:58
in reply to nevent1q…6hy3

Freedom Tech on Nostr: ...



# 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.

Here are the [steps from this website](https://youness.net/linux/set-random-wallpapers-unsplash-com-ubuntu) explaining how:

1. Create a script with above code (I’m doing it in /bin folder):
```
cd /bin
sudo nano unsplash.sh
```
2. Ctrl+X, then Y, then Enter, to save the script.

3. Make it executable, and run it:
```
sudo chmod +x unsplash.sh

./unsplash.sh
```

### 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](https://nostr.at/npub1fkluklzamwpyn7w8awxzrcqe7z8mldlvthk4gz9kz3vsh6udz62s9qj48l)

#CronJob #RandomWallpaper #CinnamonDesktop #MateDesktop
#Linux #FreedomTech
Author Public Key
npub1fkluklzamwpyn7w8awxzrcqe7z8mldlvthk4gz9kz3vsh6udz62s9qj48l