So here’s a script to set up everything needed to change xplanetFX’s textures to the NASA series.
- Right click the link and choose „save as…“
- Make the file executable
- If you want: Edit the first ### CONFIGIURATION ### section with a text editor to fit your needs (shouldn’t be necessary)
- Put an entry in your autostart configuration or set up a cronjob
To see if the setup is downloading everything you may want to run it from a terminal once.
After the first run a new hidden folder exists in your home directory called .NASA-blue-marble-collection. This one holds all of the downloaded files and some update information. The standard configuration also uses a new topography image and the NASA night map from the NASA (which can be disabled in the configuration section).
Everytime the script runs it looks if you have installed a new template (or overwritten the earth texture in any other way) or if the month changed since the last update. If so, it takes the image for the actual month, resizes it to xplanetFX’s resolution and stores it in the right place to be used by xplanetFX. The same is done with topography and night map if you enabled them (default is on, leave empty if you don’t want to use them).
The images aren’t taken from the NASA server (because it rejects download tries from scripts and blocks your IP for a couple of minutes afterwards) but from other servers found on the internet hosting this stuff. If they’re down search your fav search engine for the filenames (not the complete URL’s) from the configuration section.
The files are downloaded once with the first run of the script. You may want to force a complete refresh, then use the option -r or –refresh to delete all files related to this thing and start all over (It will not destroy anything in xplanetFX but will remove its folder completely – so don’t place the script in .NASA-blue-marble-collection!). If you want to force the update of the textures use -f or –force to rewrite xplanetFX’s textures, no matter what the latest update information says.
This script can be used for other purposes, too. Just take a look in the configuration section on the top of the script to change resolution, target file to write to or stuff like that. If you want to use them as your desktop wallpaper you may want to append the little „^“ sign to the resolution setting which means that imagemagick keeps the ratio of the image and doesn’t destroy them, for example „1280×960^“
…do not hammer down the servers (with -r). There are enough problems with clouds images and stuff so we don’t need more problems with earth textures atm ,) and note: the images are of 2007 – there are no updates. So a simple one-time-setup per machine should be enough.
This script was hacked in half an hour so there’s no guarantee at all ,) it was tested on Ubuntu 10.04 by now, please leave a short comment if you’re experiencing any problems or if you want to let the world know about a success on your particular system.
Since version 2.3.0 this feature is permanently built into xplanetFX and can be used via GUI and CLI.