Raging Goblin

20 April 2010

Eartwallpaper revisited

Filed under: Linux — Raging Goblin @ 19:49
Tags: , , , ,

Recently I found a script written by Claudio Novais to show a nice wallpaper which displays a picture of the Earth, in real time. On my system this looks like this:

Original wallpaper

Now, I recently got this huge monitor so this didn’t look so well and I decided to change it a little. On http://www.fourmilab.ch/earthview/ you can find an earth and moon viewer. You can alter the image to your liking. So I created an image of 800px x 800px with a view from 35785 km above, 53°23’N and 6°E (roughly Amsterdam, The Netherlands). With ctrl-u (firefox) I looked at the source from the website and found a line like this:


This was clearly the image I was looking at. So my wget line in the original script now looked like this:

wget http://www.fourmilab.ch/cgi-bin/Earth?di=09523FEE4A66A46BC0364BAA5DD73780BB5E4B6C16283003C802B34399E
-O world.jpg

The result was quite satisfactory:

Second attempt

But with all this space left I was wondering if I could do a little better. E.g. put a view of the moon on the left side. Using the same procedure as before I found that a picture from the moon, viewed from my place (change E to W and N to S) gave me the following id:


The moon is not changing every minute, so downloading it at startup would satisfy my needs. I put the following line in /etc/rc.local (I am on Arch Linux):

wget http://www.fourmilab.ch/cgi-bin/Earth?di=69325F8E2A06C40BA0562BCA3DB757E0DB3421067C425A69A268D908D
E182D6639D0D6F -O /home/-username-/.gnome2/moon.jpg

And a black picture with resolution 1820*956 as background.jpg. Find the needed resolution by subtracting the border (2*50px) from your full screen. Then altered the script to use ImageMagick and blend these pictures together:

cd ~/.gnome2/
while [  1 ]; do
 while [  $COUNTER -lt 60 ]; do
 wget http://www.fourmilab.ch/cgi-bin/Earth?di=752E4392361AD817BC4A37D621AB4BFCC72237106A544C7FB47ECF3FE5
88636F85BB29877916B -O world.jpg
 composite -bordercolor black -border 50x50 moon.jpg background.jpg backgroundWithMoon.jpg
 composite -gravity center world.jpg backgroundWithMoon.jpg completeWallpaper.jpg
 temp=$(stat -c%s world.jpg)
 if [[ $temp > 1000 ]]
 then rm world_sunlight_Wallpaper.jpg
 mv completeWallpaper.jpg world_sunlight_Wallpaper.jpg
 sleep 5</span>
<span style="color:#0000ff;"> let COUNTER=COUNTER+1
 sleep 900

The result :):

Earth an moon together

1 Comment »

  1. Hi raginggoblin,
    Thank you for your reference of my work! Well, your new idea is great, so I’m thinking in making a article in my site about it!

    You made an excellent work, congratulations!

    Cláudio Novais.

    Comment by Claudio Novais — 28 April 2010 @ 10:46 | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

%d bloggers like this: