How do I customize the desktop wallpaper slideshow?

14,460

Solution 1

I think I'm late but...

I created an xml background (with full paths descriptions), and I've saved it at /usr/share/backgrounds/my-background.xml

then I edited /usr/share/gnome-background-properties/ubuntu-wallpapers.xml adding

<wallpaper deleted="false">
 <name>My background</name>
 <filename>/usr/share/backgrounds/my-background.xml</filename>
 <options>zoom</options>
</wallpaper> 

just saves the file and the new slideshow wallpaper is shown in appearences window

hope it works for you :D

Solution 2

Also, when editing /usr/share/gnome-background-properties/ubuntu-wallpapers.xml, ommiting the options tags altogether will allow you to choose to either tile, zoom, center, scale, fill or span in the Appearance GUI in Settings.

Example using Locutus's example above:

<wallpaper deleted="false">
 <name>My background</name>
 <filename>/usr/share/backgrounds/my-background.xml</filename>
</wallpaper>

Solution 3

I use the following script I wrote and launch it using the gnome 'Startup Applications' launcher. To improve system performance the script suspends the slideshow while XMBC or VLC is running or the system load exceeds the specified threshold.

Save the script to a file and chmod +x to make it self executing.

wallpaper-slideshow.sh

#!/usr/bin/python

import os
import random
import time
import re
import subprocess

# directory where Pictures are stored
pictureDirectory = os.getenv("HOME") + "/.xbmc/userdata/Thumbnails/Video/Fanart"

# time in seconds to wait between transitions 
duration=60

# maximum system load before the slideshow is suspended
maxSysLoad=0.5

def getPictureList():
    result = []
    for root, sub, files in os.walk(pictureDirectory): 
        for f in files:
            if f.endswith(('.jpeg','.jpg','png','.tbn')):
                result.append(os.path.join(root, f))               
    return result


def getSystemLoad():
    uptimeString = subprocess.check_output(["uptime"])
    return float(re.match(r".*load average: ([^,]+),.*", uptimeString).group(1))

def isProcRunning(name):
    with open(os.devnull, "w") as devnull:
        return subprocess.call(["pidof", name], stdout=devnull) == 0

def setDesktopBackgroundPicture(filename):
    return subprocess.call(["gsettings", "set", 
        "org.gnome.desktop.background", 
        "picture-uri", '"file://' + filename + '"'])

def main():
    time.sleep(10) # startup delay    
    pictureList = getPictureList() 
    while 1:       
        if getSystemLoad() > maxSysLoad or isProcRunning("vlc") or isProcRunning("xbmc.bin") :
            print "slide show suspended while VLC or XMBC is running or system load is high"
        else:
            picture = random.choice(pictureList)
            print picture
            setDesktopBackgroundPicture(picture)
        
        time.sleep(duration)
        
if __name__ == "__main__":
    main()        

Solution 4

The key here is to point Gnome to the location of your XML slideshow file. From some reason, this option isn't available in dconf-editor, but you can use gsettings to get and set it. (Ref: ArchWiki):

To read the current setting:

GSETTINGS_BACKEND=dconf gsettings get org.gnome.desktop.background picture-uri

To set the new slideshow:

GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.background picture-uri 'file:///home/username/path/to/your/slideshow.xml'

Maybe you have created an XML slideshow previously, or you can use this script.

I can recommend Crebs, which unfortunately isn't available for Ubuntu 11.10 through PPA, but you can download and install the package for Natty (which is a little bit risky), or use the source package - once extracted, you don't have to install anything, just run the script crebs/bin/crebs script (note that Crebs may have some dependencies, run the script from terminal to find out).

Once you create and save Crebs slideshow you like, the resulting XML is saved to ~/.crebs/ directory - as mentioned above, just run:

GSETTINGS_BACKEND=dconf gsettings set org.gnome.desktop.background picture-uri "file://$HOME/.crebs/MySuperCoolSlideshow.xml"

(remember to change the file name) and the slideshow will be instantly applied.

Solution 5

You can go to the terminal and type

wallch -h

There is an option to make it run in the background.

Wallch options

  -h or --help Show help options.
  --earth      Starts live earth wallpaper, updating every 30 minutes.
  --once       Change desktop background once by picking randomly an image from the list.
  --constant   Starts changing randomly pictures from the list, without opening the Wallch GUI.

Notes

--once and --constant will only work if you have at least 2 images in the list.
--earth will only work if you have Internet connection.

Not sure if this helps, but yeah :)

I usually do

wallch --constant

then I Ctrl+Z to stop it and get back into the terminal, then I type bg to send the process to the background so it keeps running.

Share:
14,460

Related videos on Youtube

Pithikos
Author by

Pithikos

IT student

Updated on September 18, 2022

Comments

  • Pithikos
    Pithikos almost 2 years

    I spent some time and tried various things but nothing works. Here's what I have tried so far (changing the slideshow manually):

    1. Making a new folder in /usr/share/backgrounds/mywallpapers and adding my background-1.xml there.
    2. Copying a bunch of wallpapers into /usr/share/backgrounds/
    3. Copy /usr/share/backgrounds/Contest/background-1.xml to /usr/share/backgrounds/

    I logged out and in and still no changes in the Appearance app.

    I have heard about Wallch but I don't want some app running in the background all the time. I'm not even sure Wallch will work with Gnome 3. I also tried gnome-3-wp(Gnome 3 Wallpaper Slideshow app) but it just seems broken for Ubuntu 11.10 Oneiric.

    Does anyone have a solution?

  • antibus
    antibus over 11 years
    Please add some of your answer here not only the link incase the link goes down you'll answer will be useless os please improve your answer
  • Ryan
    Ryan over 10 years
    Also, relevant to those using Gnome 3.10 on Fedora 20.
  • Ryan
    Ryan over 10 years
    Also, relevant to those using Gnome 3.10 on Fedora 20.