How to Create Desktop Wallpaper Slideshow in Ubuntu 20.04

September 4, 2020 — 3 Comments

Paper GTK3 and Icon themes

This simple tutorial shows how to manually create a desktop slideshow with your photos in Ubuntu 20.04 LTS.

If you’re just looking for an automatic wallpaper changing software, here are four choices.

In Ubuntu Gnome, you can create your own wallpaper slideshow with simple XML file, then select it in Background settings.

XML slideshows in Background settings are displayed with a small clock emblem in the lower-right corner of the preview. (See the red rectangle area in the picture)

To create desktop slideshow via XML:

1.) First create an empty document, and re-name it to FILE_NAME.xml.

  • It’s not important where to put the XML file. In my case, I created it in sub folder of my Pictures directory: Pictures/Wallpaper/slideshow.
  • And the name is not important. In my case, it’s wallpaper-slideshow.xml.

2.) Open the XML file with text editor and write following line:

<?xml version="1.0" ?>
<background>
  <static>
    <duration>60.0</duration>
    <file>/home/ji/Pictures/Wallpapers/Pic1.jpg</file>
  </static>
  <transition>
    <duration>0.5</duration>
    <from>/home/ji/Pictures/Wallpapers/Pic1.jpg</from>
    <to>/home/ji/Pictures/Wallpapers/Pic2.jpg</to>
  </transition>
  <static>
    <duration>300.0</duration>
    <file>/home/ji/Pictures/Wallpapers/Pic2.jpg</file>
  </static>
  <transition>
    <duration>0.5</duration>
    <from>/home/ji/Pictures/Wallpapers/Pic2.jpg</from>
    <to>/home/ji/Pictures/Wallpapers/PicN.png</to>
  </transition>
  <static>
    <duration>60.0</duration>
    <file>/home/ji/Pictures/Wallpapers/PicN.png</file>
  </static>
  <transition>
    <duration>0.5</duration>
    <from>/home/ji/Pictures/Wallpapers/PicN.png</from>
    <to>/home/ji/Pictures/Wallpapers/Pic1.jpg</to>
  </transition> 
</background>

The file content is easy to read. It starts with <?xml version=”1.0″ ?>, then follows with a <background> node.

With in <background> node, you can add as many <static> and <transition> nodes as you can depends on number of wallpaper files.

While the <static> node contains display time (in seconds) and path to the picture file, the <transition> contains transition time and files.

Click to expand:

Make the XML slideshow visible in Background settings:

Open terminal (Ctrl+Alt+T) and run command to create the .local/share/gnome-background-properties folder if not exist:

mkdir .local/share/gnome-background-properties

Then create the config file and open with Gedit text editor:

gedit .local/share/gnome-background-properties/my-slideshow.xml

When it opens, paste following lines and change the file path in <filename> node:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
<name>Wallpaper Slideshow created by Ji</name>
<filename>/home/ji/Pictures/Wallpapers/slideshow/wallpaper-slideshow.xml</filename>
<options>zoom</options>
</wallpaper>
</wallpapers>

Finally open or re-open Background settings and you should see the new created background slideshow.

I'm a freelance blogger who started using Ubuntu in 2007 and wish to share my experiences and some useful tips with Ubuntu beginners and lovers. Please notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected]

3 responses to How to Create Desktop Wallpaper Slideshow in Ubuntu 20.04

  1. Hi Ji

    Funny that you should pick this particular subject.

    I have more than 4000 pictures which are in carefully named and organized hierachical directories. So recently I wrote a little program which traversed the directories and wrote all the file names into an xml file as you describe. But this doesn’t work, because apparently they need to all be in same directory. Is there any way around this?

    Thanks for all the useful information you’ve provided over the years. Stay well.

    Tony

  2. Very useful post.

    I was looking for a method to get a slideshow working with Regolith.

    I made a little script to generate the background XML: https://github.com/imbodensamuel/ubuntu-sideshow-wallpaper

    I notice I am no the first one hehe.

    Works with multiple folders

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*