228

How do I create a desktop wallpaper slideshow with my own set of images?

  • With the images coming from a pictures folder, or pre-selected
  • With the images displayed in order, or randomly
  • With the images changing every few minutes, or after random periods of time
1

20 Answers 20

297

If you use it to manage your photos and like it easy I recommend to use Shotwell, which should be installed by default.

Open it:

open shotwell

Select the photos you want to be set as background slideshow:

select images

Open FileSet as Desktop Slideshow or press Ctrl+B:

set as slideshow

Adjust time settings:

set time

Done.

15
  • 10
    Thanks a bunch! I like this solution over Wallch.. as you don't have to install any extra apps to achieve the same purpose
    – Antony
    Jun 6, 2014 at 6:00
  • 4
    do i need to create a startup application for the same or will it work everytime?
    – ArunMKumar
    Jun 27, 2014 at 15:16
  • 5
    Old thread, but comes up highest in search. This is BY FAR the easiest method. Still works perfectly and, to @Arun Kumar's question, loads automatically with no further work. Note: When trying to import images from a symlink, I had to change the import location in Settings by picking the folder, otherwise it would not allow selection of the images.
    – u2n
    Jan 28, 2015 at 0:45
  • 1
    Is the solution displaying Images randomly or sequentially? The images are zoomed or filled or spanned or something? Do they fit the desktop perfectly? Sep 23, 2015 at 14:49
  • 1
    @Kalamalka Kid If you want your images scaled to your screen with e.g. a black background, follow the above post then go to Ubuntu System Settings > Appearance > Look > Background. Choose 'Scale' in the dropdown box and black as the color. This works in Ubuntu 14.04 LTS.
    – jaryaman
    Jan 1, 2018 at 19:53
88
+250

Wallch

In software center there are two wallpaper changer - wallch for Gnome-Shell/Unity/Gnome-Classic and Wally for KUbuntu.

Lets concentrate on Wallch.

Sadly the version of Wallch in the software centre is outdated and has many issues especially with 14.04! There's a repository with the recent version.

To install, add the repository (you don't need to do this on 16.04):

sudo add-apt-repository ppa:wallch/wallch-daily

Then install Wallch:

sudo apt-get update && sudo apt-get install wallch

Then start from Dash:

enter image description here

Lets now launch the application preferences:

enter image description here

Let's untick the bubble notification - its annoying - at the same time you could disable sounds!

enter image description here

At the same time you can define the start-up options:

enter image description here

Save - and add a folder of pictures - in this example, use /usr/share/backgrounds for the default wallpapers that come with Ubuntu

enter image description here

Now we've got two choices:

Start up choice 1

(thanks @Naruto)

keep wallch in in the launcher

enter image description here

exit wallch and start changing wallpapers

enter image description here

Start up choice 2

start wallch on login without needing to have a launcher

From the dash:

enter image description here

Then create a new startup application with the command wallch --constant

enter image description here

N.B. - for some computers this will not work. The solution is to introduce a delay to the startup of the wallch daemon as per the following Q&A:

Wallch not auto-cycling backgrounds on log in

5
  • Wallch is defective on Lubuntu 14.04. The change interval keeps defaulting to 10 minutes or thereabouts after a reboot.
    – H2ONaCl
    Aug 1, 2014 at 8:12
  • 1
    fire a bug report on launchpad - the maintainer is an active user here as well and will hopefully respond quickly to any issues reported.
    – fossfreedom
    Aug 7, 2014 at 13:04
  • The version on the software centre is just outdated! Here's where to install the recent version: sudo add-apt-repository ppa:wallch/wallch-daily sudo apt-get update && sudo apt-get install wallch The software centre version didn't work for me but the up to date one works flawlessly! I'm 14.04 64 bits
    – 842Mono
    Oct 17, 2015 at 20:29
  • A daily build looks risky. Is there not another ppa for wallch?
    – jpaugh
    Mar 18, 2016 at 11:42
  • @fossfreedom♦ does this works on ubuntu 16.04 Jan 4, 2017 at 4:26
63

For 11.04 and previous versions

There's a program for creating wallpaper slideshows called CREBS. Check out this article about it: http://www.omgubuntu.co.uk/2010/05/crebs-the-ultimate-wallpaper-slideshow-application

A simpler app that has fewer features but is easier to use can be found here: http://gnome-look.org/content/show.php/Wallpaper+Slideshow?content=125178

alt text

0
54

IMG:   Variety

Homepage: http://peterlevi.com/variety
Github: https://github.com/varietywalls/variety

Variety is a wallpaper manager for Linux systems. It supports numerous desktops and wallpaper sources, including local files and online services: Flickr, Wallhaven, Unsplash, and more.

Where supported, Variety sits as a tray icon to allow easy pausing and resuming. Otherwise, its desktop entry menu provides a similar set of options.

Variety also includes a range of image effects, such as oil painting and blur, as well as options to layer quotes and a clock onto the background.

enter image description here

Install

It's available in the Universe repo. To install it, run

sudo apt install variety

Also you can install it from Peter Levi's PPA by running

sudo add-apt-repository ppa:peterlevi/ppa
sudo apt-get update
sudo apt-get install variety
3
  • Wow, amazing software. Very nice features, including nice display of clock and proverbs.
    – Ben
    Aug 3, 2013 at 15:44
  • 3
    Thanks for that, much better than wallch, it let's you download images from multiple sources. Aug 24, 2013 at 1:17
  • I tested them all and this was the best, more possibilities and features
    – Mathiasfc
    Sep 17, 2019 at 13:42
29

Create an XML file yourself. Use this script as a starting point with caution, it may have some errors.

#!/bin/bash

FILE="background.xml"
DURATION=10.0
TRANSITION=0.0

CURRENTDIR=$PWD
TRANSITION_XML="
<static>
    <duration>$DURATION</duration>
    <file>$CURRENTDIR/%s</file>
</static>
<transition>
    <duration>$TRANSITION</duration>
    <from>$CURRENTDIR/%s</from>
    <to>$CURRENTDIR/%s</to>
</transition>
"

# Random order
shopt -s nullgob nocaseglob        # ignore non-existant extensions, case-insensitve
IMGS=( *.{jpg,jpeg,png,gif} )
INDICES=( $(shuf -e ${!IMGS[@]}) ) # randomize indices of images
INDICES+=(${INDICES[0]})           # go back to first image after last
COUNTER=${#IMGS[@]}

exec > "$FILE"                     # all further output to the XML file
echo "<background><starttime></starttime>"

for ((i = 0; i < COUNTER; i++))
do
    index=${INDICES[i]}
    printf "$TRANSITION_XML" "${IMGS[index]}" "${IMGS[index]}" "${IMGS[index + 1]}"
done

echo "</background>"

Instructions:

Once the background.xml file has been generated, right-click on the desktop, select Change Background Image, click Add..., then navigate to the directory containing the XML file. Just above the "Open" button change the selector from "Image" to "All files", then select the background.xml file and click on the "Open" button. The file can be renamed to be more descriptive, such as my_family.xml, landscapes-3.xml, etc., allowing one to have multiple slide show playlists.

8
  • 1
    I have modified the above script, adapting it to be a Nautilus Script: stefanobagnatica.it/dl/jaub/create_slideshow.sh.txt Just put that in .local/share/nautilus/scripts, than in Nautilus select folder with wallpapers and right click > Scripts > create_slideshow: it will create XML file in .backgrounds and XML wallpaper definition file in gnome-background-properties folder.
    – Stefano
    Jul 9, 2013 at 20:35
  • @Pisu could you please upload that script to another location? It now gives a 404 error.
    – Spotlight
    Dec 19, 2015 at 1:23
  • paste.ubuntu.com/8091445
    – Stefano
    Dec 20, 2015 at 5:11
  • while this might seem like a nice answer, there are no instructions as to what to do with the file after it is created. Feb 23, 2016 at 1:45
  • 1
    Just tried it out out Ubuntu 16.04 - unfortunately there is no "All files" selector anymore. Any idea how do make it work on Ubuntu 16.04? May 6, 2018 at 10:16
9

For gnome 3, generate the xml using one of the previous answers, then you could add the generated xml via the command line:

gsettings set org.gnome.desktop.background picture-uri 'file:///home/pykler/.backgrounds/realtime/background.xml'

Another Solution (this will add your bg to the Appearance area under gnome-control-center):

mkdir -p ~/.local/share/gnome-background-properties/

cat >~/.local/share/gnome-background-properties/custom-wallpapers.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
  <wallpaper deleted="false">
    <name>Pykler</name>
    <filename>/home/pykler/.backgrounds/realtime/background.xml</filename>
    <options>zoom</options>
  </wallpaper>
 </wallpapers>
EOF

Replace the name "Pykler" and the path "/home/pykler/.backgrounds/realtime/background.xml" as needed.

0
6

For Gnome 3, you can use the Wallpaper Slideshow App.

Wallpaper Slideshow App screenshot

According to its developer, it has the following features:

  • Lets you choose the folder via a browser.
  • Lets you set the timeout in seconds.
  • Lets you chose depth of subdirectory.
  • You can enable or disable it with a single click.
  • Full-feature tooltips

To download:

git clone git://gitorious.org/gnome-3-wp/gnome-3-wp.git

Then run wp-show in the gnome-3-wp folder in your home folder.

For more information, see here and here.

1
  • Won't work on newlly installed Oneiric Ubuntu 11.10. Had to fix the #!/usr/bin/env python2 to #!/usr/bin/env python but still it gives a bunch of errors.
    – Pithikos
    Oct 23, 2011 at 12:52
4

Ok here is how I did it, which is probably not the best way to do it but it worked and I didn't have to install anything to do it. Back in 11.10 I found the below python script (slideshow.py) which generates a slideshow.xml file (run from directory with the images in it). This is still the file needed in 12.04 but you also need another XML file. Put the XML file generated by slideshow.py script in /usr/share/backgrounds/contest and chown it to root. Once that is done you'll need to run the second python script (wallpapers.py) which was adapted from the first. Put the file generated from wallpapers.py in /usr/share/gnome-background-properties and again chown it to root. At that point you should be able to go into "System Settings" -> Appearance and pick your slideshow or any of the pics in it.

slideshow.py:

#!/usr/bin/env python
#coding=utf-8
# slideshow.py
import glob, os
import shutil
import time
import Image

filelist=[]
def filelie(path):
    if os.path.isfile(path):
       wenjian=os.path.splitext(path)[1][1:]
       if wenjian=="jpg" or wenjian=="png" or wenjian=="gif":
        try:
          kuan,gao = Image.open(path).size
          if kuan>=1024 and gao>=768:
            filelist.append(path)
        except IOError:
         pass
    elif os.path.isdir(path):
        for item in os.listdir(path):
            itemsrc = os.path.join(path, item)
            filelie(itemsrc)

curdir = os.getcwd()
filelie(curdir)
currentImageFiles = filelist
#print filelist
if os.path.isfile('slideshow.xml'):
 os.remove('slideshow.xml')


currentTime = time.localtime()
length = len(currentImageFiles)

f = file('slideshow.xml', 'w')

f.write('<background>\n')
f.write('\t<starttime>\n')
f.write('\t\t<year>' + str(currentTime.tm_year) + '</year>\n')
f.write('\t\t<month>' + str(currentTime.tm_mon) + '</month>\n')
f.write('\t\t<day>' + str(currentTime.tm_mday) + '</day>\n')
f.write('\t\t<hour>' + str(currentTime.tm_hour) + '</hour>\n')
f.write('\t\t<minute>' + str(currentTime.tm_min) + '</minute>\n')
f.write('\t\t<second>' + str(currentTime.tm_sec) + '</second>\n')
f.write('\t</starttime>\n')
f.write('<!--This animation will start at the time it created-->\n')

for i in currentImageFiles:
 length = length - 1
 f.write('\t<static>\n')
 f.write('\t\t<duration>96.0</duration>\n')
 f.write('\t\t<file>' + currentImageFiles[length] +'</file>\n')
 f.write('\t</static>\n')
 f.write('\t<transition>\n')
 f.write('\t\t<duration>3.0</duration>\n')
 f.write('\t\t<from>' + currentImageFiles[length] + '</from>\n')
 if length >= 1:
  f.write('\t\t<to>' + currentImageFiles[length-1] + '</to>\n')
 if length <1:
  f.write('\t\t<to>' + currentImageFiles[len(currentImageFiles)-1] + '</to>\n')
 f.write('\t</transition>\n')

f.write('</background>\n')
f.close()

wallpapers.py:

#!/usr/bin/env python
#coding=utf-8
import glob, os
import shutil
import time
import Image

filelist=[]
def filelie(path):
    if os.path.isfile(path):
       wenjian=os.path.splitext(path)[1][1:]
       if wenjian=="jpg" or wenjian=="png" or wenjian=="gif":
        try:
          kuan,gao = Image.open(path).size
          if kuan>=1024 and gao>=768:
            filelist.append(path)
        except IOError:
         pass
    elif os.path.isdir(path):
        for item in os.listdir(path):
            itemsrc = os.path.join(path, item)
            filelie(itemsrc)

curdir = os.getcwd()
filelie(curdir)
currentImageFiles = filelist
#print filelist
if os.path.isfile('mywallpapers.xml'):
 os.remove('mywallpapers.xml')


currentTime = time.localtime()
length = len(currentImageFiles)

f = file('mywallpapers.xml', 'w')

f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
f.write('<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">\n')
f.write('<wallpapers>\n')
f.write('\t<wallpaper deleted="false">\n')
f.write('\t\t<name>My custom Wallpapers</name>\n')
f.write('\t\t<filename>/usr/share/backgrounds/contest/slideshow.xml</filename>\n')
f.write('\t\t<options>zoom</options>\n')
f.write('\t</wallpaper>\n')

for i in currentImageFiles:
 length = length - 1
 f.write('\t<wallpaper>\n')
 f.write('\t\t<name>' + os.path.basename(currentImageFiles[length]) +'</name>\n')
 f.write('\t\t<filename>' + currentImageFiles[length] +'</filename>\n')
 f.write('\t\t<options>zoom</options>\n')
 f.write('\t\t<pcolor>#000000</pcolor>\n')
 f.write('\t\t<scolor>#000000</scolor>\n')
 f.write('\t\t<shade_type>solid</shade_type>\n')
 f.write('\t</wallpaper>\n')

f.write('</wallpapers>\n')
f.close()
4

Use cortina, it works pretty well.

It can set the desktop background picture to be set a random file from a given directory.

It can be installed via Ubuntu Software Center.

Install via the software center

2
  • 1
    I don't see this in the Software Centre in Natty, am I missing something, or has it been removed? May 23, 2011 at 14:52
  • 2
    Cortina is only available in the (currently unreleased) Ubuntu 12.04. However, it is broken.
    – 8128
    Mar 14, 2012 at 18:32
3

You might be interested in a program that automatically creates such a wallpaper-slideshow.

According to this OMG! Ubuntu post, you have for example 'Wallpaper Gallery'. It takes as input data tagged photos from your Shotwell gallery. Therefore it becomes very easy to add & remove photos for instance.

First select the tags concerning the photos you want to be displayed, then configure as you wish the switching time, the order, etc. Here some screenshots :

Wallpaper Gallery display options Wallpaper Gallery data source

3

I wanted the changing wallpaper and custom wallpaper pictures to appear under the default options for selecting a wallpaper in Ubuntu 12.04,so I did the following

Using Terminal navigate to:

/usr/share/gnome-background-properties

typing ls will list all files in that folder you should see a file called precise-wallpapers.xml, back it up in case something goes wrong

sudo cp ./precise-wallpapers.xml ~

then edit it to add wallpapers that you want to appear in your default wallpaper options

sudo gedit precise-wallpapers.xml

this is how I added a polarbears wallpaper, previously I copied the precise.xml located in the contest folder and edited it with pictures that I wanted to display:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
  <wallpaper deleted="false">
    <name>Ubuntu 12.04 Community Wallpapers</name>
    <filename>/usr/share/backgrounds/contest/precise.xml</filename>
    <options>zoom</options>
  </wallpaper>
  <wallpaper>
    <name>polarbears</name>
    <filename>/usr/share/backgrounds/polarbears/polarbears.xml</filename>
    <options>zoom</options>
  </wallpaper>
  <wallpaper>
    <name>Delicate Petals</name>
    <filename>/usr/share/backgrounds/Delicate_Petals_by_lefthandgergo.jpg</filename>
    <options>zoom</options>
    <pcolor>#000000</pcolor>
    <scolor>#000000</scolor>
    <shade_type>solid</shade_type>
  </wallpaper>
  <wallpaper>

you can add regular jpg or png files, I recommend copying them to the /usr/share/backgrounds then adding them to this xml file. I hope this helps.

3

Change it from appearance, under system settings as seen below

enter image description here

Or you can do so, by installing Desktop Nova. To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get install desktopnova desktopnova-tray desktopnova-module-gnome

Once installed, search for it in Dash, and click on it, and when the program open, add your images, and setup the time interval.

enter image description here

enter image description here

enter image description here

Command complements of Desktopnova

1
  • quite detailed explanation @Mitch
    – meteors
    May 20, 2013 at 11:07
3

Yes, you can.

Locate an already made animated wallpaper and modify it.

For example, there should be one in /usr/share/backgrounds/contest (at least on Precise Pangolin).

The file is called precise.xml in my case and it is an XML file. All you need to know to modify it is that any tag like <background> contains other tags and texts and must be closed with </background>.

Try to find out what these tags mean (see below), change the name of these pictures and save as... somewhere. Call it whatever_you_want.xml.

Then change your background: choose a new wallpaper by browsing your computer and, instead of choosing a .jpg, choose your .xml.

Some tags:

<background> contains everything. Your file must begin with it and end with </background>. It's called the root tag.
<starttime> defines when the diaporama starts. A precise date must be given, any date.
<static> contains the definition of a still image.
<transition> is used to fade from one image to the other.
<duration> gives in seconds the time during witch the picture is displayed or the fading time.
<file> contains a single image to show as still.
<from> and <to> contain single images which are respectively the one at the beginning and at the end of a fading.

Some additional hints:

By adding the number of seconds of all the <duration> tags in the file, you'll know how much time it takes to perform a complete loop of the diaporama.

The nicest configuration is this one (simplified, without durations):

<static>
    <file>image1</file>
</static>
<transition>
    <from>image1</from>
    <to>image2</to>
</transition>
<static>
    <file>image2</file>
</static>
<transition>
    <from>image2</from>
    <to>image3</to>
</transition>
...

Don't forget to end your diaporama with a transition to your first picture, or else it will abruptly change from one static to another.

I tried to do an animated background, once. Images displayed less than 1 second each. You can try it for fun, but frankly, you'll want to throw your mouse to the monitor before the end of the day.

2

I wanted to do the same thing a while back; here is my script: http://pastebin.com/FkaxaN3J

Just stick it in the directory, make executable, and run.

2
  • 1
    Your script looks pretty good. Are you up for creating a slightly different version to answer this question: askubuntu.com/q/35971/458 ? It has been open for 10 months and is not getting answers. Feb 27, 2012 at 14:48
  • @RichardHolloway, that's a good question you've linked, but one that I've run out of time to help answer. If you or anyone else wants to take the script and run with it, they're welcome to do so.
    – zpletan
    Feb 28, 2012 at 2:21
2

IMG:   Desk Changer for GNOME shell

by egach

In case you use gnome-shell (version > 3.8, default in Ubuntu 17.10 and later), use this nice extension.

Simple wallpaper changer with multiple profile support. Supports integration into the system menu or its own panel icon. The daemon is written in Python and runs independently of the extension.

Extension Homepage: https://github.com/BigE/desk-changer/

enter image description here

Install

First you have to install gnome-tweaks

sudo apt install gnome-tweaks

Visit the gnome-extension homepage and switch the slide on. Afterwards you can configure the extension to change the background's change time and the backgrounds itselfs. To do so open gnome-tweaks, go to the Extension tab and click on the Configure icon of the desk-changer.

1

After seeing this request, I was curious about a solution and found something to be able to get your wallpaper image to be a part of the default wallpaper selection when going into System Settings >> Appearances. Follow the steps below in a terminal:

  1. cd /usr/share/gnome-background-properties
    • This will take you to the specific path mentioned
  2. sudo cp ./ubuntu-wallpapers.xml ~
    • This will copy the file ubuntu-wallpapers.xml into your home directory
  3. sudo vim ./ubuntu-wallpapers.xml
    • The command vim is a terminal editor but you can change it to gedit if you wish

Once you are in that file, you will see tags called <wallpaper> and </wallpaper> that is around the other tags like <name> and <options>. You will need to copy that and paste it right below that entry. Once done, you should edit that extra entry you added to match what you want. An example can be found below:

enter image description here

In this example, I made changes to the <name>, <filename>, <pcolor>, and <scolor> information to match what I needed for the wallpaper I wanted. Now I see the wallpaper as a default selection in the wallpaper section of the System Settings -> Appearance GUI:

enter image description here

If anything doesn't work, use the following command to import back the save file we made from above:

sudo cp ~/ubuntu-wallpapers.xml /usr/share/gnome-background-properties/

Hope this helps.

0
1

IMG:   Random Wallpaper for GNOME shell

by iFlow

In case you use gnome-shell (version > 3.12, default in Ubuntu 17.10 and later), use this nice extension. This extension fetches a random wallpaper from an online source and sets it as desktop background. The desktop background can be updated periodically or manually.

Online sources: - unsplash.com - desktopper.co - wallheaven.cc - reddit.com - basic JSON APIs or Files (See the GitHub wiki for more information) (Chromecast, Bing, NASA, Google Earth View, etc.)

Extension Homepage: https://github.com/ifl0w/RandomWallpaperGnome3

enter image description here

Install

First you have to install gnome-tweaks

sudo apt install gnome-tweaks

Visit the gnome-extension homepage and switch the slide on. Afterwards you can configure the extension. To do so open gnome-tweaks, go to the Extension tab and click on the Configure icon of the random-wallpaper.

-1

feh, an imlib2 based image viewer is a very flexible, efficient and and powerful X11 image viewer aimed mostly at console users. "Unlike most other viewers, it does not have a fancy GUI, but simply displays images. It is controlled via commandline arguments and configurable key/mouse actions."

I'm doing randomized slideshows of a set of many thousands of images with it, in a deep directory structure. When running in window mode, rather than desktop background, I can add comments to them easily when I see one I like, and go into sequential mode to look for similar ones.

-3

try slidewall as well, it has clock displayed..

1
  • 3
    Maybe you can edit your question to help the OP understand how Slidewall can answer their question as well as how to get it :-) Aug 17, 2012 at 19:52
-3

Go to System Settings > Appearance then mark the photo with clock on it at the right side.

1
  • 2
    The original poster doesn't want to manually change the image every ten minutes... they want to be able to set it up to run automatically from a directory of images that they choose.
    – Taryn East
    Mar 17, 2015 at 23:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .