231

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
ish
  • 141,990
David Siegel
  • 9,022

20 Answers20

306

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.

Jakob
  • 10,789
88

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

muru
  • 207,228
fossfreedom
  • 174,526
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

dieki
  • 3,412
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
abu_bua
  • 11,313
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.

muru
  • 207,228
borjacampina
  • 1,054
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.

Pykler
  • 687
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.

Mandy
  • 520
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()
Jet
  • 301
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

Madhava
  • 459
3

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.

abu_bua
  • 11,313
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.

Melebius
  • 11,750
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.

Joe
  • 31
  • 1
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

Agmenor
  • 16,394
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

Mitch
  • 109,787
2

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.

abu_bua
  • 11,313
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.

zpletan
  • 3,443
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.

ruffEdgz
  • 2,132
-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.

nealmcb
  • 3,715
-3

try slidewall as well, it has clock displayed..

dr_smit
  • 309
-3

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

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407
Akram Lazkanee
  • 473
  • 5
  • 11
  • 23