Return to Level1Techs.com

Ever wanted live earth (Continental US) as a background?

#1

Fun little project. Hopefully to others interested will enjoy it.

Now I need to preface this downloads an image every 10 mins and this is not an explicit tutorial. Those who know bash should be able to figure this out. I will provide light support below for anybody who considers them to much of a beginner…
Okay so newer users. If you have questions below I will provide them. As for making it easier I recommend you install nano and then edit your .bashrc file to include this at the bottom

export EDITOR=nano
export VISUAL=nano

You will leave far less confused and not have to use vim or vi to edit your crontab

then run source .bashrc

So lets move on to the bread and butter… every 10 minutes we acquire a GOES 16 full color image of the CONUS. This is 9.5 MB so if you equate this to a monthly amount of data at maximum its (31*24)/10 = 74.4 MB … so this does not use much bandwidth.

I am using the MATE desktop environment you will have to find the appropriate dconf command for your Desktop Environment

#!/bin/bash
wget ftp://ftp.star.nesdis.noaa.gov/pub/star/goes/GOES16/ABI/CONUS/GEOCOLOR/latest.jpg -O /home/heimdallr/Pictures/EarthLive/latest.jpg
DIR="/home/heimdallr/Pictures/EarthLive"
PIC=$(ls $DIR | shuf -n1)
CMPL=$DIR/$PIC
dconf write /org/mate/desktop/background/picture-filename "'$CMPL'"

Now run crontab -e

Enter this and save (10 minutes is current setting)

*/10 * * * * /home/heimdallr/Pictures/EarthLive/BackgroundChanger.sh

If you live in another part of the world and seek to do the same thing please share the wget URL below for the latest.jpg of the sattelite you use. Be aware this only works if the image is constantly updated and retains the same name .

Also new users be aware you do need to change the directory to reflect your user directory and where you store this script especially for cron execution

Please note to the advanced users that this can be improved with aria2c however I do not know if the NASA servers like multiple connections all the time. Be Curtious! its why I did not do it with aria2c

If you do use aria2 try to keep your parrallel connections low. Say aria2c -x 4 "file" 8 is alright too just try not to go above 16. You could get rate limited

Here is what it might look like: (if downloading to home directory)

#!/bin/bash
rm latest.jpg 
aria2c -x 8 ftp://ftp.star.nesdis.noaa.gov/pub/star/goes/GOES16/ABI/CONUS/GEOCOLOR/latest.jpg 

After you ran the script and scheduled it. Dont forget to set the the wallpaper to the downloaded file. It will auto update in most DE’s

Have fun!

Heimdallr Out

5 Likes

pinned #2

Til Monday at 8pm American CST

0 Likes