Live Background of the Earth on Ubuntu (or any other Gnome linux for that matter)

Ever wanted to have a live background of the earth on ubuntu. Well here’s how.
1) Get some background images, I put the ones I use at the end of this post.
2) Get a cloud map, I put this in a cronjob in order to make it refresh every hour or so. Now you can use your background as a weather report!
wget -N -O /home/user/.xplanet/images/clouds_4096.jpg
I use the -N here to make sure I’m not loading the server unnecessarily, but there’s also no reason to put it in your crontab at too high a frequency.
3) Use xplanet to make a background (I put the latitude and longitude to center the image on NYC (home for me), so I suggest you change that.
xplanet –latitude 40 –longitude -73.961506 –conf /home/user/.xplanet/overlay_clouds –output /home/user/Pictures/world.jpg –verbosity 4 –geometry 4096×2048 –num_times 1
4) Put the cloud getting and the earth drawing in a cronjob, and set your desktop background to the output image. Gnome will check if the image changes, and update your background when the file changes. Awesome.

And overlay_clouds looks like this:
map=/home/user/.xplanet/images/earth_4096_l.jpg # This image needs to be cloud-free
night_map=/home/user/.xplanet/images/night_4096.png # This image needs to be cloud-free

Then for maps here are mine, but I recommend checking out what you can find. I might switch to using this one,, for which I’d probably get the 5k wide image and scale down a bit. Everything works best if you scale all images to the same size before giving them to xplanet. That’s why I use 4096, because it’s the highest res cloud map I can find.


A New Toy

xplanet, is a wonderful little program that will render various celestial objects including everyone’s favorite, earth.  Thinking of cron, a fun trick might be to make a cronjob which paints a background of the world, and then use that image as the desktop.

A few notes, useful at least for me, the location of NYC is 40.809634,-73.961506 or -latitude 40.809634 -longitude -73.961506.

To fetch the newest cloudmap (checking to see if the server version has been updated)
wget -N

Posted in Tech. Tags: , , . Leave a Comment »