Sid Meier’s Civi­liza­tion V is a great turn-based strat­egy game, and it comes with a lot of art and music assets bundled with it. I really like the paint­ings used as the load­ing screen’s back­ground, so I wrote a small tool to extract those from the game files and to rotate them as your favourite Linux distro’s wallpaper.

One of the paintings, representing an industrial era factory

The tool I wrote is a Python 3 pack­age, and it’s made to be easy to use: it extracts the wall­pa­pers from the game files and it can config­ure cron to rotate wall­pa­pers. You must have a copy of the game installed on your computer in order to extract wall­pa­pers from it: I don’t want to distrib­ute them ille­gal­ly, and you’re not wast­ing your money buying it, it’s such a great game.

Also, the wall­pa­per rota­tion currently supports only the GNOME and Unity desk­top envi­ron­ments, but you can still extract the wall­pa­pers from the game files if you have another DE such as KDE or XFCE.

Installing and configuring the tool

Before installing the tool, make sure you have Python 3 and ImageMag­ick installed on your comput­er: with­out them the tool won’t run prop­er­ly. On Debian/Ubun­tu, you can install those by open­ing a termi­nal and execut­ing this command:

$ sudo apt install python3 imagemagick

Then you can execute the follow­ing commands to start using the tool:

$ sudo python3 -m pip install civ5-wallpapers
$ civ5-wallpapers setup

The first command fetches and installs the tool from the Python Pack­ages Index, and the second one is an inter­ac­tive setup which helps you extract the wall­pa­pers and config­ure the rotation.

Another painting, representing the International Space Station

Source code and advanced usage

All the source code of the tool is avail­able under the GNU-GPL v3 (or later) license in its git repository. I’d like to thank LRN from the CivFa­nat­ics forum for its game files unpacker, which I then opti­mized and adapted for this tool.

The tool currently lacks support for a lot of desk­top envi­ron­ments in its auto­matic rota­tion feature: if you want to imple­ment it for your favourite one, feel free to send a pull request and I’ll happily release the changes!

There are also a few extra features in the tool, such as manu­ally extract­ing the wall­pa­pers to a direc­tory and manu­ally change the current wall­pa­per. Check out the README for more details about that.

A painting representing the Globe Teather