The United States’ National Oceanic and Atmospheric Administration (NOAA) operates a satellite that takes full disc photos of the earth every hour. This satellite, called the Geostationary Operational Environmental Satellite (GOES),supports weather forecasting, severe storm tracking, and meteorology research. But the fun part for us is that its images are available for free online and can be used to create your own dynamic wallpaper.
You can see all the images here: https://www.star.nesdis.noaa.gov/goes/
For our purposes, we’re going to be using the GOES-East Full Disk GeoColor image. Click the “Download images” link to see the full listing of images. We just need the link for the 10848x10848 image, e.g., https://cdn.star.nesdis.noaa.gov/GOES16/ABI/FD/GEOCOLOR/10848x10848.jpg
Next we need to create a script that can download the latest image, set it as your wallpaper, and repeat hourly. Create a script called get-latest-noaa-goes-image.sh
with the following contents, changing YOUR_LOCATION
to wherever you want to store the image:
#!/bin/bash
echo "Downloading latest image from NOAA" > YOUR_LOCATION/noa-goes.log
IMAGE_URL="https://cdn.star.nesdis.noaa.gov/GOES16/ABI/FD/GEOCOLOR/10848x10848.jpg"
OUTPUT_FILE="YOUR_LOCATION/noa-goes.jpg"
curl -o "$OUTPUT_FILE" "$IMAGE_URL"
echo "Download complete" >> YOUR_LOCATION/noa-goes.log
This will download the image to YOUR_LOCATION
directory and will log the download status to a noa-goes.log
file.
The harder part is actually telling your operating system that the image has changed and it needs to refresh it’s wallpaper.
On KDE, this was harder than I expected. I leveraged the guidance from https://develop.kde.org/docs/plasma/scripting/. In my testing, I found that my script had to write to a different file first then back to the NOAA image to trigger update. Here’s the script I wrote to trigger the wallpaper to refresh:
#!/bin/bash
echo "Updating Desktop wallpaper" >> YOUR_LOCATION/noa-goes.log
dbus-send --session --dest=org.kde.plasmashell --type=method_call /PlasmaShell org.kde.PlasmaShell.evaluateScript 'string:
var allDesktops = desktops();
for (i=0; i < allDesktops.length; i++){
d = allDesktops[i];
d.wallpaperPlugin = "org.kde.image";
d.currentConfigGroup = Array("Wallpaper", "org.kde.image", "General");
var cfg = d.readConfig("Image")
print("desktop " + i + ": " + d.id + ": " + cfg +"\n");
if (d.id == 27) {
print("updating desktop " + d.id + "\n");
d.writeConfig("Image", "file:///YOUR_LOCATION/dummy.jpg")
d.writeConfig("Image", "file:///YOUR_LOCATION/noa-goes.jpg")
}
}'
echo "Done" >> YOUR_LOCATION/noa-goes.log
Note: you can test the script above by running plasma-interactiveconsole
. Your desktop id will probably be different from 27
so use the print statements to find it. Make sure you also have a dummy.jpg to use as the swap image.
I combined that with my script which downloads the image, and now I have a single script that can download the image and set it as the wallpaper.
To trigger this script to run every hour, in the past I would have used cron
but since I’ve switched to an atomic desktop (Aurora), I had to use systemd timers instead. This guide was super helpful in setting up the timers to call my script.
Now whenever I return to my computer, I’m greeted with a beautiful view of the earth from space as it looks right now.