Friday, June 11, 2010

Multiple wallpapers on Ubuntu

GNOME has supported creating slide show wallpapers for a long time now. Basically, it's an xml document format that let's you specify what wallpapers to use and the wallpaper changing interval. Unfortunately, there's no UI for generating said xml document which leaves this feature in a rather unusable state for less tech savvy folks.

Since I'm quite the avid anime fan, I have over the years accumulated quite the wallpaper collection. It's time to put the collection to use.

First, the format for the xml document which turns out not to be too difficult to understand, really. A simple Google search and by referencing the included Cosmos slide show you can quickly get the gist of how things work. Here's the basic structure that needs attending:

<background>
    <starttime>
        <year>2009</year>
        <month>08</month>
        <day>04</day>
        <hour>00</hour>
        <minute>00</minute>
        <second>00</second>
    </starttime>
    <static>
        <duration>1795.0</duration>
        <file>/usr/share/backgrounds/cosmos/cloud.jpg</file>
    </static>
    <transition>
        <duration>5.0</duration>
        <from>/usr/share/backgrounds/cosmos/cloud.jpg</from>
        <to>/usr/share/backgrounds/cosmos/comet.jpg</to>
    </transition>
    .
    .
    .
</background>

Next, simply repeat each static and transition pair for every wallpaper you wish included in the slide show. Be sure the last transition goes to the first wallpaper, and you have a slide show that cycles endlessly through your selection of favorite wallpapers. duration is in seconds, while file, to and from tags take the full filepath to your wallpaper.

Related posts:

Wallpaper slideshow on Ubuntu

Credits:

Format My Source Code for Blogging has been useful in preparing the xml used in this post.