Astronomy Picture of the Day as ubuntu Wallpaper
Discover the cosmos! APOD features every day a different image or photograph of our fascinating
universe, along with a brief explanation written by a
professional astronomer.
Installed as startup application, this tool brings up a new ubuntu desktop background every day.
Functionality includes:
- Download today’s picture
- Scale and crop to optimum screen resolution
- Annotate picture with title and one line of explanation (explanation is truncated, because we want to see the image, not the text)
- Annotate picture with ubuntu logo
- Install as Gnome desktop wallpaper
- If the URL of a different "Picture of the Day" is given as an argument, the script will use this picture instead.
Installation
The tool is a sh-shell-sript and will run on any installation with a
Gnome or unity desktop. If you use a different
desktop environment, just edit the repective line in the script to the command for setting a wallpaper
for your environment.
The two applications wget and ImageMagick must be installed for
file download and image manipulation (if you haven’t them installed yet, it’s about
time to install these indispensable tools anyway).
- Download the tar-archive and extract it into your home directory. A hidden directory .apod
will be created with the 3 files apod-wallpaper.sh (the script) apod-wallpaper.config (configuration)
and ubunto-550.png
(the ubuntu logo which mustn’t be forgotten):
> cd > tar -xvzf apod<version>.tar.gz
- Make sure that the extracted script is executable:
> cd .apod > chmod 755 apod-wallpaper.sh
- Edit the configuration file apod-wallpaper.config to adapt it to your preferred
screen resolution. Actually
Gnome will scale the wallpaper to your screen anyway - but we want to picture to look as nice
as possible.
The default resolution is 1920x1200:
SCREEN_GEOMETRY="1920x1200"
- Run the following tests. The first command sets the desktop background to today’s
"Picture of the Day."
The second command sets the desktop background to the NGC 3521 image shown on top of this page:> ./apod-wallpaper.sh > ./apod-wallpaper.sh http://apod.nasa.gov/apod/ap110915.html
- Include apod-wallpaper.sh in the list of your "Startup Applications"
(System->Preferences menu):
Open the dialog and add the file apod-wallpaper.sh to the list of startup applications. After that, the script will run every time you log in to your desktop. If an internet connection exists, the current Picture of the Day will be set as desktop wallpaper. If no internet connection is found, the desktop will not change. - Lean back and enjoy a new magnificent astronomy picture every day.
Remarks
Wallpaper doesn’t change
The software tries to parse APOD html-files in order to extract url, title and
explanation of the image. It works for most APOD-pages back to the 90s.
However, there is no "official" format for these pages. Therefore it sometimes
happens that a page
cannot be parsed correctly (e.g. APOD of 20 September 2011 is a video clip that
is impossible to be converted into a wallpaper ;o).
In almost all of these cases apod-wallpaper.sh will just refuse to create a new wallpaper and as a result yesterday’s picture will be displayed for another day.
For the same reason -to adapt to the continuously changing format of the html code of APOD- the script has been adapted many times in the past years. New versions are released from time to time, to follow future changes.
No APOD wallpaper displayed at all
If you use a different desktop environment and don’t know which command changes the desktop backgrund, the script will work anyway. Here is the quick-and-dirty workaround:
apod-wallpaper.sh always creates a wallpaper image file with the same name at the same location:
$HOME/.apod/apod.pngJust configure your desktop with this image as background. You never need to change it. The software will replace the file every day with the new image and your desktop will change consequently.
Please read our disclaimer before downloading and using this software.
This work is licensed under a GNU General Public License Version 2 . |