Programmatically decorate your OSX desktop with randomly selected wallpapers from National Geographic
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ngwallpaper is a tiny Python script useful to programmatically download and decorate your OSX desktop with randomly selected wallpapers provided by National Geographic. Supported repositories are:

I created this script for my own personal use. It should work in older OSX versions, and it should be easily extended to support other platforms, multi-screen configurations, etc. Anyway, I haven't tested this in other platforms / configurations, and I don't plan to do that in the future :)


  1. Clone this repository somewhere in your computer.

    $ cd ~
    $ git clone
  2. Install the Python libraries required by the script.

    $ sudo pip-2.7 install BeautifulSoup
  3. Manually execute the script for the first time.

    $ python2.7 ~/ngwallpaper/ --use-ngm-latest --use-ngm-archive --use-miscellaneous-galleries --destination ~/Pictures/ngwallpapers/ --store --retries 100

    This should change the background of your desktop and create a couple of files in ~/Pictures/ngwallpapers/: the wallpaper image and a text file containing some information about the image.

  4. Add a new entry to your personal crontab (crontab -e) to periodically change your wallpaper.

    0 * * * * /opt/local/bin/python2.7 ~/ngwallpaper/ --use-ngm-latest --use-ngm-archive --use-miscellaneous-galleries --destination ~/Pictures/ngwallpapers/ --store --retries 100 > /dev/null
  5. When using the --store, previously downloaded wallpapers are not removed. You may want to use the folder containing all those images as a source for your screen saver.