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.

2 comments:

  1. The lack of a default UI has already led many people to create one.
    Stewart Gateley has created Wallpaper Slideshow.
    Ruben Verweij has developed Wallpaper Stacks Creator.
    And I, along with several translators, am responsible for Create Background Slideshow.
    Each caters to a slightly different kind of user, but they all create the XML files that GNOME uses for the background.

    ReplyDelete
  2. Thanks for the wonderful resources, Marc

    ReplyDelete