Gnome Shell Animated Background

The support for animated backgrounds in Gnome is not new, but the path to actually rolling your own and activating it on your system is all but easy today. Ubuntu offers 2 magically changing backgrounds but no information about how to do this yourself. There is a cute “+” button that allows you to add new static backgrounds but that’s it. To make things worse, the plus doesn’t allow you to add such a magical background either, when you finally create one.

An animated background for Gnome Shell consists of a wad of images you want to use as backgrounds and an XML file detailing how and when to show this data. I was honestly expecting a single file, instead of this multi-file concept, but apparently the multi images backgrounds are not really ready for the common user. A single tar file would solve the problem though so this should not be that far off.
Adding your file to the desktop menu is another problem altogether, as you cant’t use the plus to add the XML file. This requires either a workaround or a second XML file in a separate directory outside of your home directory.

To create such a background, start by collecting a wad of suitable backgrounds to rotate around. (I expect lots of funny moments with NSFW backgrounds and presentations as this concept catches on) and put them together. You don’t actually have to do this, but it helps to have them in one place. I used “~/Pictures/Fallout” as I was creating a Fallout background theme and I like pictures to go into the Pictures map. Next you need to create the XML. This file is formatted as follows:


<file>/home/gert/Pictures/Fallout New Vegas/1347371663_intonewvegas_543942.jpeg</file>
<from>/home/gert/Pictures/Fallout New Vegas/1347371663_intonewvegas_543942.jpeg</from>
<to>/home/gert/Pictures/Fallout New Vegas/Fallout-New-Vegas_2010_03-06-10_14.jpg</to>



The XML consists of a starttime tag and as many static and transition tags as you have backgrounds.
The starttime tag defines when the timer for changing  the background starts running. Any past date will do and unless you want do create a background that follows your day cycle or clock, the time doesn’t really matter either.
The static section defines what files to show and for how many seconds, the transition section defines a transition between the backgrounds and how much time such a transition should take. Your last transition should be back to your first image.

Writing a file yourself is easy but tedious and there are graphical interfaces available that do this for you. Sadly, these do no appear to be included in the default Ubuntu repository. They all appear to be obsolete to some degree. I used Crebs and it works wonderfully though the dependencies fail to define the requirement for the python-glade2 package in Ubuntu, resulting in a crash until you install that package. The internet also provides the XML Background Creator for Gnome3 and a selection of interesting articles and even pre-made downloadable packages, though these don’t exactly install nicely.



More information at


Actually using your freshly created background is not that simple though. The GUI does not appear to provide any mechanism to add the XML file to the menu or to otherwise activate it. There are 2 options but none of them is particularly user friendly.

You can tell gnome to use a certain background using gsettings on the commandline, but this will only activate the background and not add it to your selection menu.

gsettings set org.gnome.desktop.background picture-uri ‘file:///home/gert/Pictures/Fallout New Vegas/Fallout_New_Vegas.xml’


The second option is adding the background to the gnome menu. You do this by creating a new XML file, telling gnome where to find your spiffy new background.

You can add the new background to your desktop menu by adding an XML file, telling Gnome where to find your background XML. This XML goes into


and is formatted as follows

# cat Fallout.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE wallpapers SYSTEM “gnome-wp-list.dtd”>
<filename>/home/gert/Pictures/Fallout New Vegas/Fallout_New_Vegas.xml</filename>

This file is fairly simple, it defines the name of the background, where to find the file detailing the background and what options to enable, ie to zoom the desktop.


The whole process is pretty painless; except that initially I wrote this”One problem I am experiencing though is the desktop not changing.” (small problem ey) but it turns out that it’s ok. The issue is rather that the desktop doesn’t change at the correct time. It seems that the first section is ignored. It should change around the hour and half hour mark, but instead it’s been changing around 16, 46 minutes. I guess the system resumed rotation at .16 and is rotating from that point on. I don’t mind this so I did not look into this any further. My rotating background works like a charm 🙂

Published by Gert


One thought on “Gnome Shell Animated Background

  1. Thanks a lot for this! I just got some wallpapers setup for this myself by copying the adwaita xml files 🙂 – thanks for explaining their content!


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: