General
Create your own desktop slideshow on Ubuntu
January 2, 2012
0

Happy new year!!!

Tired of your usual desktop background? Do you have many new pictures you’re not able to choose from? Well, there is a solution to this: you could use a specific software or, if you want to learn something new, use my procedure. First of all, where are all my background images located? Open your terminal and type:

sudo nautilus /usr/share/backgrounds/

Now using navigator commands create a new folder and call it, for example, my_images, copy all the images you like inside this folder and create a new file, calling it background-1.xml.

Ok, you’re almost at the end! Open the file using your preferred text editor (e.g. gedit) and paste the following code

<background>
 <starttime>
 <year>2011</year>
 <month>01</month>
 <day>02</day>
 <hour>16</hour>
 <minute>00</minute>
 <second>00</second>
 </starttime>
<!-- This animation will start at 4pm. -->
 <static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_01.jpg</file>
 </static>
 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_01.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_02.jpg</to>
 </transition>
 <static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_02.jpg</file>
 </static>
 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_02.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_03.jpg</to>
 </transition>
 <static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_03.jpg</file>
 </static>
 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_03.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_04.jpg</to>
 </transition>
 <static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_04.jpg</file>
 </static>
 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_04.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_05.jpg</to>
 </transition>
 <static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_05.jpg</file>
 </static>
 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_05.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_06.jpg</to>
 </transition>
<static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_06.jpg</file>
 </static>
 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_06.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_07.jpg</to>
 </transition>
<static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_07.jpg</file>
 </static>
 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_07.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_08.jpg</to>
 </transition>
<static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_08.jpg</file>
 </static>
 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_08.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_01.jpg</to>
 </transition>
 </background>

Ok now you have to modify this file, but first let’s examine it. This is an xml file which tells GNOME how to handle the images you need to have your own background slideshow; it tells the system from which picture it has to start and if you want or not a transition. This second point depends on wether or not this part is in the file:

 <transition>
 <duration>5.0</duration>
 <from>/usr/share/backgrounds/vaio/vaio_08.jpg</from>
 <to>/usr/share/backgrounds/vaio/vaio_01.jpg</to>
 </transition>

this tells the system that you want a transition from picture vaio_08.jpg, to vaio_01.jpg and the duration is 5 seconds. If you dont want a transition just use:

<static>
 <duration>1795.0</duration>
 <file>/usr/share/backgrounds/vaio/vaio_08.jpg</file>
</static>

This tells the system that you want vaio_08.jpg  as a background for 1795 seconds before using the next picture. As you can see, in the <static> section, you have to write path to the current background image, while in the <transition> part you have to write where the transition starts and where it ends. Be careful about, dashes, underscores, capital letters etc. The paths must be written correctly, otherwise you will not see anything!!! You have to add a <static> and a <transition> section until you run out of images. Note that there MUST be a transition between your LAST and your FIRST image (in my example: from vaio_08.jpg to vaio_01.jpg).

Now save your file, right click on your desktop, choose “Change desktop background” and drag the xml file inside the Background window or you can also click the “Add” button, select “All files” right above the “Open” button and navigate to the XML file and open it.

Well folks, it’s done!!! Now what you have to do is enjoying your brand new desktop slideshow!

Enjoy!

Leave a Reply

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close