Rotating Picture of the Earth as Ubuntu Wallpaper
Lifehacker had a recent post on how to set your Ubuntu desktop background to a rendered picture of the earth, complete with accurate weather and sunlight. The lifehacker method involves downloading a new, fully-rendered image every four hours. This method is less than optimal. You can generate the same image yourself, using the same data, and update it continuously. Let me lay out how you should be automatically updating your Ubuntu background with an image of the earth, complete with accurate clouds.
The files on die.net are generated using xplanet. I did this on Ubuntu 9.10, but I don't think I'm doing anything that wouldn't work just as well on 10.04.
First, install the xplanet package, as well as the supplementary images package.
sudo apt-get install xplanet xplanet-images
Next, make a directory to for the rendered images and the satellite cloud image. I used ~/.backgrounds/.
mkdir ~/.backgrounds/
To get the cloud file and put it in the right place, you want to use wget.
wget -q -O ~/.backgrounds/clouds_2048.jpg http://xplanet.sourceforge.net/clouds/clouds_2048.jpg
This will grab a current cloud image and stick it in your ~/.backgrounds directory. To automate this, you should set up a cron job to do this every few hours. If you don't know what it means to set up a cron job, install gnome-schedule.
sudo apt-get install gnome-schedule
Go to gnome schedule, Application >> System Tools >> Scheduled Tasks. Create a new scheduled task. Give it a description like "Update XPlanet Weather Map" and paste that wget command into the command box. For "Time & Date", select Advanced. Put in a number between 0 and 59 in the minute box, to spread out the load. For the hour box, put in */4 to update the image once every four hours. Click apply, then run your task once from the main task list by pushing the gear button. This is the same procedure as the lifehacker article, except we're downloading the cloud image from the gentleman who developed xplanet, instead of the pre-rendered image of the entire earth.
The next step is to create a configuration file for xplanet. Mine is .xplanet and it is in my home directory. It looks like this. You will need to change the <YOUR USERNAME> part.
[earth]
cloud_map=/home/<YOUR USERNAME>/.backgrounds/clouds_2048.jpg
image=/usr/share/xplanet/images/earth.jpg
night_map=/usr/share/xplanet/images/night.jpg
xplanet -config .xplanet -hibernate 120 -output .backgrounds/earth.jpg -geometry 1440x980 -projection mercator
ps auwwwx|grep xplanet
n 8557 9.0 0.1 10204 3344 pts/1 S+ 01:40 0:02 xplanet -config .xplanet -hibernate 120 -output .backgrounds/earth.jpg -geometry 1440x980 -projection mercator
n 8586 0.0 0.0 3036 788 pts/2 S+ 01:41 0:00 egrep xplanetxplanet -config .xplanet -hibernate 120 -output .backgrounds/earth.jpg -geometry 1440x980 -projection mercator -longitude -81