Ski season is upon us here in Northern Utah. 24” of snow in the past 3 days and more to come in another storm later this week. I find myself looking at web cams quite a bit, like the ones provided by Solitude Mountain Resort, my favorite place.

To make my life easier, I added a line to my crontab to automatically set the latest webcam image taken from Moonbeam Lodge as my xfce wallpaper at the top of every hour.

This is the crontab line:

0 * * * * wget https://webcams.solitudemountain.com/mbl.jpg -O /tmp/solitudecam.jpg; xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitor0/workspace0/last-image --set /tmp/solitudecam.jpg

Edit An updated version checks more often but only retrieves a new image and sets it as a wallpaper if the previous image stored is more than 5 minutes old:

* * * * * if test `find "/tmp/solitudecam.jpg" -mmin +5`; then wget https://webcams.solitudemountain.com/mbl.jpg -O /tmp/solitudecam.jpg; xfconf-query --channel xfce4-desktop --property /backdrop/screen0/monitor0/workspace0/last-image --set /tmp/solitudecam.jpg; fi

This captures the case where I open my laptop at, say, 15:02 and I have to stare at an image that may be hours old. I need to see the fresh powder!