Oct
31

Use an Accurate Satellite View of the Earth as your GNOME Background

This site provides an accurate satellite view of the Earth; you can see the current areas that are in sunlight and darkness, as well as being able to see the current weather patterns (updated from actual satellite weather imagery). Here’s a script that will download the latest image and set it as your GNOME background.

Note: You can set this script as a cron job and have the background update automatically, but be courteous. The site hosting this image will not be able to continue to do so if everyone sets their computer to update every 5 minutes. The actual site only updates once every few hours, so I would recommend not setting the update to more often than once every 2/3 hours or so.

Here’s the script: update_earth_background

#!/bin/bash
gconftool-2 --type string --set /desktop/gnome/background/picture_options "none"
gconftool-2 --type string --set /desktop/gnome/background/picture_filename ""
wget  http://static.die.net/earth/mercator/1600.jpg -O /home/bcoop/Pictures/Backgrounds/earth.jpg
gconftool-2 --type string --set /desktop/gnome/background/picture_filename "/home/bcoop/Pictures/Backgrounds/earth.jpg"
gconftool-2 --type string --set /desktop/gnome/background/picture_options "scaled"

You’ll need to change the path to be something that is valid for your user and machine, but this should give you all the information you need to make it happen…

6 Comments to “Use an Accurate Satellite View of the Earth as your GNOME Background”

  • Daniel October 31, 2010 at 11:15 pm

    If you like your world projection to show some other part of the world occupying the middle, you can use convert to crop and rejoin the image.

    convert 1600.jpg -crop 800×887+0+0 1600-left.jpg
    convert 1600.jpg -crop 800×887+800+0 1600-right.jpg
    convert +append 1600-right.jpg 1600-left.jpg 1600-swap.jpg

    Or you can merge all three commands into a single one-liner:
    convert +append <(convert 1600.jpg -crop 800×887+800+0 – ) <(convert 1600.jpg -crop 800×887+0+0 -) 1600-swap.jpg

    • OmniWired November 1, 2010 at 12:19 pm

      here a version with a fail over (default) image. Mac and Gnome version.
      GNOME:
      gconftool-2 –type string –set /desktop/gnome/background/picture_options “none”
      wget http://static.die.net/earth/mercator/1600.jpg -O /home/omniwired/Pictures/earth.jpg
      if [ $(stat -c %s /home/omniwired/Pictures/earth.jpg) = "0" ];
      then

      gconftool-2 –type string –set /desktop/gnome/background/picture_filename “/home/omniwired/Pictures/default.jpg”

      else
      gconftool-2 –type string –set /desktop/gnome/background/picture_filename “/home/omniwired/Pictures/earth.jpg”
      fi
      gconftool-2 –type string –set /desktop/gnome/background/picture_options “stretched”
      MAC
      ## satellite.sh
      #!/bin/bash
      curl -G http://static.die.net/earth/mollweide/1600.jpg > /Users/nameghino/tmp/earth.jpg 2> /dev/null
      defaults write com.apple.desktop Background ‘{default = {ImageFilePath = “/Users/nameghino/tmp/earth.jpg”; };}’
      killall Dock

    • Jerad November 1, 2010 at 2:12 pm

      Your script did not work for me until I replaced the “x” between 800 and 887 with my own. Seems somehow it was changed, and was the wrong character to work properly. Other than that, great idea!

      You enjoy the pacific?

      • Daniel November 3, 2010 at 11:53 pm

        Jerad: it looks like whatever software this blog is running prettified the ‘x’ into some other unicode character.

        I live in NZ, having it right in the middle makes more sense to me. You can of course use the same idea to split and rejoin at any point on the map

    • Paul October 10, 2011 at 9:47 pm

      Thank you Daniel! You’re a star – I’ve been wondering how to get this image centred on NZ. Clearly the greatest nation on earth! Europe is OK sometimes too I guess. ;-)

  • Roger January 27, 2011 at 6:28 pm

    Sweet, I have been using the Cosmos slideshow as my desktop background for too long now. This is really similar, but much cooler, cause it is mostly real-time. Can’t wait to give it a whirl, although I work offline a lot so would probably set the refresh time as considerably longer…

Post comment

%d bloggers like this: