How to set a rotating picture of the earth as your wallpaper in Ubuntu

Pictures of earth from space are the coolest. Wouldn’t it be great if we could get the latest images of what the earth looks like straight on our desktops? offers just such a service. They provide the latest computer generated image of what the earth might look like at the moment. Things like the cloud formations and the sunlight are taken into account. The result is a pretty up to date and stunning looking image, available to you and I for free. We can use some Ubuntu magic to bring that image down to our desktop and set it up as a rotating wallpaper. Let’s take a look at how to go about setting it up.

Scheduling a task can be done directly from the command line if you are familiar with how to do it. For users who are not very geeky, there is a simpler option in Gnome Schedule. To install the gnome task scheduler launch a terminal window and execute the following command:

# sudo apt-get install gnome-schedule

After the installation is complete Gnome Schedule will be available in your Ubuntu menu. Go to Applications -> System tools -> Schedule tasks. In Gnome Schedule click on New. This will launch the configuration window for a new task. Enter something like Moving Wallpaper in the Description: section.

In the Command: section, enter:

wget -r -N

If you’re not familiar with wget, it is a very powerful command line download tool. The URL we feed it here is where the most up to date image of the earth is made available by the fine folks at They make a new image available every three hours.


Next is the Default Behaviour drop down menu. Select the Suppress Output option here.


After this you will need to schedule the task. As you don’t want to flood the server it might be a good idea to download the image from their server once a day. To do that set the scheduler to Every day. You can set something more specific if you like by going to the Advanced section and setting up a higher frequency. Note that the image is updated once every three hours, and not with a greater frequency. So if you set it to download the image every few minutes, it will download the same image again and again – wasting both your bandwidth and’s. So at a very minimum, set the update frequency to every 3 hours. Once you are done hit the Add button to wrap things up.


In the last step what we did was to setup a task to download the latest image. This image is by default saved to the home directory of the user that set it up. The image goes into a path like this /home/username/ This is where all the files that are downloaded will get stored. The old image will be replaced by the new one.

Now we need to setup our Ubuntu box to pick up the image as the wallpaper. To do that right click on your desktop and pick Change Desktop Background. Click on the Add option in the Appearance Preferences that opens. Now navigate to /home/username/ and hit Open. Click Close on the Appearance Preferences window.


Here’s the final result. My Ubuntu Lucid Lynx machine with the stunning view from the sky.

click to enlarge

If this article helped you, I'd be grateful if you could share it on your preferred social network - it helps me a lot. If you're feeling particularly generous, you could buy me a coffee and I'd be super grateful :)
buy a coffee for

Home » Linux » How to set a rotating picture of the earth as your wallpaper in Ubuntu

28 thoughts on “How to set a rotating picture of the earth as your wallpaper in Ubuntu”

  1. I can’t view the downloaded fileERROR: (Not a JPEG file: starts with 0×47 0×49)

    Any solutions? I would love to have this as my wallpaper

  2. Partial filling of images started at ubuntu10.04,that’s why i still use Linux Mint 8(Ubuntu 9.10).
    But now I have another problem and it affects Linux Mint 9,after downloading the image is not viewable.To attempt to view the image appears the following error (Not a JPEG file: starts with 0x47 0x49)
    If i download the image with a web browser it’s viewable…

  3. How do you make it so that the new image over-writes the old? Because the new image is 1600.jpg1 the image never changes….

  4. now checks user agent strings, you must add –user-agent=”Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070725 Firefox/″ or similar switch to the command

  5. I have the same “background half grey”-problem, and the tip from Phil does not help, this was how i was doing it the whole time…

    The image is always downloaded correctly when this happens ( it does not happen always, just sometimes).

    To me it feels like a concurrency issue / race condition thing (perhaps due to multicore processor?). I could imagine something like the file is being downloaded and finished and gnome sees the new file (yes, it doesn’t need the gconftool thing, it automatically detects if the background image changes, at least for me), but when it is loading the file is not finished on disk, still partly in cache from the other processor, and gnome reads the file only partially. Setting it then again via gconftools does not help because it already updated to that image and does not see anything new… but this is just pure speculation.

    I played with a seperate script to first copy the image to a backup copy, setting background to that copy, then downloading and then switching to the new image, insert sleeps into the script file and tried various things, with no success. However all image files on the disk are correct when i open them in another application.

    Funny other observation is, it does this “partial half grey” thing only (but not always!) when my script is run by cron, when i run it manually it always works..

    I know this comments here are some months old, but maybe someone else found a solution or has a new idea?!


  6. I download the image every 5 minutes, but desktop dosn’t refresh… the image is dowload good.

  7. L’immagine viene scaricata (la scarico ogni 5 minuti), ma non viene fatto il refresh del desktop… come posso fare?

  8. I was getting the lower grey portion when the image automatically updated. If I switched the wallpaper then switched back it fixed it. So I now do the following:

    wget -r -N; gconftool-2 –type string –set /desktop/gnome/background/picture_filename “/home/user/”

    Which grabs it, then changes it to itself (I.e. refreshes it). Note: change /user/ to your username.

  9. @Jacob: Thanks for the reply. When I open the image in a photo application it shows correctly. When I click on the desktop background and Change Desktop Background, if I set the Style from Zoom to Span, then the image shows correctly.
    Any ideas why? Should I leave it at Span?

  10. @akendrick451: The grey lower portion of your background sounds like the image is corrupt. This could happen if your Internet connection stalled while the image was being downloaded. Try opening the image in a photo application: if the image is corrupt, you’ll see the corruption there too. If the image is corrupt, then you can download it again, and that should fix it.

  11. so if you’re like me your resolution may not be 1600. I used a combination of convert to resize the resolution on the fly to my laptops. I changed my crontab command to be :
    ‘wget -N -O – | convert – -resize 1400×1050 1400.jpg >/dev/null 2>&1′

    where my resolution is 1400 x 1050. Don’t forget to add ‘ -O – ‘ to the wget command to pipe it correctly! Also I saw no point to add wget -r since this is recursive and you’re already grabbing the direct file. PLUS you can have up update more than every three hours since the -N will check if the timestamp is changed and only grab a new one if it changes.

  12. When I try this, my background is only partially drawn. I have the top half of the picture of the earth showing and grey screen below that. Any ideas why? Do I have to manually get ubuntu to refresh the background?

  13. Depends: python(<2.5) but 2.6.5-0ubuntu1 is to be installed .. is the dependencies error I get whenever I try to get gnome-schedule in my lucid lynx

Leave a Comment

Your email address will not be published. Required fields are marked *