planetary eyecandy

February 11th, 2007

Eyecandy is somehow nicer when it serves some purpose aside from just looking pretty, wouldn't you say? Then it has the same kind of effect as a great car or fine architecture. "Wow, it's great. And it looks awesome." Otherwise the appearance on its own seems a bit shallow and pointless. Now for the demo, here's my newest wallpaper (click to see the fullsize hosted on deviantart):

we_call_it_planet_earth_by_numerodix.jpg

If you've ever thought that having one particular image on your desktop gets a bit dull, then this may be something for you. xplanet generates images of the Earth at set intervals (for example every 10 minutes) that shows the Earth roughly at this point in time. In addition, what I have here is cloud cover updated every 3 hours, so it's like a weather map. xplanet is phenomenally flexible, it can render multiple bodies at the same time (for example the Earth and the moon), it renders stars, it renders all the planets in the Solar System (yes, Pluto too) and many more bodies. What I have is a pretty standard configuration. So where to pick up the goodies? First, install xplanet (it's in portage :) ). Then if you run KDE, right click on the desktop and go into the config. On the Background tab, click Advanced Options and xplanet should appear in the list there.

xplanet_adv_opts.png

When you click Modify... xplanet will most likely have filled in the blanks for you, but otherwise something like this will do:

xplanet_params.png

The Preview cmd isn't really important, but for Command you could use:

xplanet -config ~/.xplanet.rc -radius 60 -latitude 52 -longitude 5 --geometry %xx%y --num_times 1 --output %f.jpg && mv %f.jpg %f

This will center the view on Utrecht more or less, but you can pick your own coordinates. Since we've supplied a configuration file, we have to create one.

$ echo -e "[earth]\ncloud_map=/tmp/.xplanet/clouds_2048.jpg" > ~/.xplanet.rc

Now we want to rig up a system that will download updates of the cloud map when they are available. We've already declared that they should be written to /tmp/.xplanet/clouds_2048.jpg, so let's create that path now.

$ mkdir -p /tmp/.xplanet

We'll use Michal Pasternak's python script for this. First save the file in /usr/local/bin, make it executable, then open it and edit this line:

defaultOutputFile = "/tmp/.xplanet/clouds_2048.jpg"

And finally we're going to use our friend cron to execute the script every hour:

$ crontab -e

And add this line:

0 * * * * python /usr/local/bin/download_clouds.py &>/dev/null

And that's it. Now you have a totally kickass wallpaper. :cool:

References

  1. Tomasz Karbownicki's original entry which explains how to do this in Gnome [pl]
  2. Kamil Baćkowski's follow-up entry on using xplanet in KDE [pl]
  3. xplanet website with tons of info and hacks
:: random entries in this category ::

10 Responses to "planetary eyecandy"

  1. Betelgeuse says:

    Would probably be better to write the clouds to somewhere inside /home. Hardcoded paths in /tmp can be a security problem.

  2. Voyageur says:

    Nice, for some reason I still thought that xplanet looked like xearth! It sure looks great on my desktop, thanks for the enticing screenshot

    Btw, for WindowMaker, just add this line to ~/GNUstep/Library/WindowMaker/autostart:
    xplanet -config ~/.xplanet/cloudsrc -radius 50 -latitude 48 -longitude 2 -fork

    and it's set!

    (I use ~/.xplanet for both rc file and downloaded images)

  3. [...] also cloud cover is updated every three hours. Your desktop will serve as your own weather map! Numerodix explains how xplanet is [...]

  4. Paul says:

    I am using Ubuntu 7.10 and Gnome 2.20.1, I install packages xplanet and xplanet-images from Synaptic, but nothing happens when I type command "xplanet" in terminal.

    I am still new to linux, do I miss something? thanks a lot for help!

    $ slocate xplanet
    /etc/xplanet
    /etc/xplanet/rgb.txt
    /etc/xplanet/satellites
    /etc/xplanet/satellites/iss
    /etc/xplanet/satellites/iss.tle
    /etc/xplanet/stars
    /etc/xplanet/markers
    /etc/xplanet/markers/earth
    /etc/xplanet/config
    /etc/xplanet/config/default
    /etc/xplanet/config/overlay_clouds
    /etc/xplanet/config/moon_orbit
    /etc/xplanet/config/earth_markers
    /etc/xplanet/origin
    /etc/xplanet/origin/galileo
    /etc/xplanet/origin/cassini
    /var/lib/dpkg/info/xplanet.list
    /var/lib/dpkg/info/xplanet.prerm
    /var/lib/dpkg/info/xplanet.postrm
    /var/lib/dpkg/info/xplanet.md5sums
    /var/lib/dpkg/info/xplanet.postinst
    /var/lib/dpkg/info/xplanet.conffiles
    /var/cache/apt/archives/xplanet_1.2.0-3_i386.deb
    /usr/bin/xplanet
    /usr/share/doc/xplanet
    /usr/share/doc/xplanet/README.config
    /usr/share/doc/xplanet/README.gz
    /usr/share/doc/xplanet/NEWS.gz
    /usr/share/doc/xplanet/README.Debian
    /usr/share/doc/xplanet/copyright
    /usr/share/doc/xplanet/FAQ.html
    /usr/share/doc/xplanet/changelog.gz
    /usr/share/doc/xplanet/changelog.Debian.gz
    /usr/share/man/man1/xplanet.1.gz
    /usr/share/menu/xplanet
    /usr/share/xplanet
    /usr/share/xplanet/arcs
    /usr/share/xplanet/arcs/README
    /usr/share/xplanet/arcs/constellations
    /usr/share/xplanet/rgb.txt
    /usr/share/xplanet/satellites
    /usr/share/xplanet/satellites/iss
    /usr/share/xplanet/satellites/README
    /usr/share/xplanet/satellites/iss.tle
    /usr/share/xplanet/fonts
    /usr/share/xplanet/fonts/README
    /usr/share/xplanet/fonts/FreeMonoBold.ttf
    /usr/share/xplanet/spice
    /usr/share/xplanet/spice/mgs
    /usr/share/xplanet/spice/cassini.krn
    /usr/share/xplanet/spice/README
    /usr/share/xplanet/spice/mgs.krn
    /usr/share/xplanet/spice/asteroids
    /usr/share/xplanet/spice/voyager.krn
    /usr/share/xplanet/spice/voyager
    /usr/share/xplanet/spice/cassini
    /usr/share/xplanet/spice/asteroids.krn
    /usr/share/xplanet/stars
    /usr/share/xplanet/stars/BSC
    /usr/share/xplanet/ephemeris
    /usr/share/xplanet/ephemeris/README
    /usr/share/xplanet/scripts
    /usr/share/xplanet/scripts/convertCassini2.perl
    /usr/share/xplanet/scripts/convertCassini.perl
    /usr/share/xplanet/markers
    /usr/share/xplanet/markers/mars
    /usr/share/xplanet/markers/moon
    /usr/share/xplanet/markers/earth
    /usr/share/xplanet/markers/README
    /usr/share/xplanet/markers/brightStars
    /usr/share/xplanet/config
    /usr/share/xplanet/config/default
    /usr/share/xplanet/config/README
    /usr/share/xplanet/config/overlay_clouds
    /usr/share/xplanet/config/moon_orbit
    /usr/share/xplanet/config/earth_markers
    /usr/share/xplanet/images
    /usr/share/xplanet/origin
    /usr/share/xplanet/origin/README
    /usr/share/xplanet/origin/galileo
    /usr/share/xplanet/origin/cassini

  5. numerodix says:

    What do you mean by "nothing happens"? Running xplanet generates an image that you can then set as your wallpaper. In the simplest case:
    $ xplanet --num_times 1 --output map.jpg
    This creates a file map.jpg. In order to have the spinning effect I described this has to be run repeatedly as per the instructions in the original post. I haven't tried setting this up on Ubuntu, so your mileage may vary. And if you're running Gnome you can't really follow the KDE instructions anyway.

    Btw to get a list of all the files installed by a package:
    $ dpkg -L xplanet

  6. wilberfan says:

    What does it mean when it just shows an entirely grey (cloud-covered?) sphere? (Did I end up with Venus, or something?!)

    I'm running KDE 3.5.9 on Sidux...

  7. numerodix says:

    I don't think I've ever seen that :/

  8. newKbuntu says:

    What do you mean by "Make it executable"? I am new to linux, do i have to compile the code in the file? if so how in linux?

  9. numerodix says:

    Make it executable means changing the permissions of the file so that it can be executed. You do this like so:
    $ chmod +x file

  10. [...] also cloud cover is updated every three hours. Your desktop will serve as your own weather map! Numerodix explains how xplanet is [...]