They offer different flash templates with latest features.
Login

Forgot password
Register
Back
Written by:
goose
Score: 6
votes: 9
Format: Article

 Wallpaper Slideshow


It is possible, without installing any additional packages, to have a slideshow of wallpapers as your background. To do this, you should place all your desired wallpapers into a folder, and then you can run this script.

To break down the script, and explain what it does and how it works:

You can use an .xml file as a wallpaper, which will tell Mint to use a certain image for a certain amount of time, and then fade transition into a new wallpaper. Here's an exerpt of the file:

<background></background>
<starttime></starttime>
<year>2012</year>
<month>07</month>
<day>08
<hour>00</hour>
<minute>00</minute>
<second>00</second>

<static></static>
<duration>10</duration>
<file></file>
/home/goose/Pictures/wallpaper-1.jpg


<transition></transition>
<duration>2</duration>
<from></from>
/home/goose/Pictures/wallpaper-1.jpg

<to></to>
/home/goose/Pictures/wallpaper-2.jpg


<static></static>
<duration>10</duration>
<file></file>
/home/goose/Pictures/wallpaper-2.jpg


<transition></transition>
<duration>2</duration>
<from></from>
/home/goose/Pictures/wallpaper-2.jpg

<to></to>
/home/goose/Pictures/wallpaper-1.jpg


 

Now, from top to bottom, let's look at each tag, by its category.

 

<background></background> This tag opens and closes the file.

 

 

<starttime></starttime> This is the time that the first slide should have (or will) start at.
<year></year> This is the year your "Start Time" tag will use.
<month></month> This is the month your "Start Time" tag will use.
<day></day> This is the day your "Start Time" tag will use.
<hour></hour> This is the hour your "Start Time" tag will use.
<minute></minute> This is the minute your "Start Time" tag will use.
<second></second> This is the second your "Start Time" tag will use.

 

 

<static></static> This tag idenifies the wallpaper to be displayed, and how long to dispaly it for.
<duration></duration> How long the wallpaper should be dispalyed for.
<file></file> The location of the wallpaper.

 

 

<transition></transition> This will hold the details for the transition to the next wallpaper.
<duration></duration> How long the transition between wallpapers should last for.
<from></from> The wallpaper being currently dispalyed; also the wallpaper in the "Static" tag directly above.
<to></to> The next wallpaper to be displayed; also the wallpaper in the next following "Static" tag.

 

When you run the script, the following will happen:

  1. The script will ask you what directory your wallpapers are in.
  2. The script will ask how long you want to display each wallpaper for.
  3. The script will ask how long you want each transition to be.

Next, the script will write the header of the background.xml file, printing the opening <background> and <starttime> tags.</starttime></background>

After writing the header, the script will then list all the files in the directory where your wallpapers are located. It will make a note of which file starts and ends the list, and then begin a loop sequence for each file listed in the output.

For each file listed in the output, the proper <static> and <transition> tags will be added to the background.xml file, and once all files have been added, the <background> tag will be closed.</background></transition></static>

Last, the script will ask you if you want it to set your .xml file as your background file. Because of the way Mint's desktop manager is setup, it is impossible to do this through GUI, and must be done through a terminal. If you chose to not set your .XML file as your wallpaper, you can do this later with the following command:

gsettings set org.gnome.desktop.background picture-uri "file:/path/to/your/background.xml"

The easiest way to update your .xml file if you should add new wallpapers in the future, would be to simply delete your old .xml file, and re-run the script to create a new one.


Tags: wallpaper,slideshow,rotate,rotating,cosmos,cosmo,xml
Created: 10 months ago.
Last edited: 3 months ago.
Reviewed: 10 months ago.
Read 0 times.

Comments
3 months ago

goose
Thanks rukh. I'm rolling dual monitors, so I need to span; however, I've added this as a prompt option. (As well as cleaned up my code a bit)  
4 months ago

rukh
Thanks for this and the script, I've modified slightly for scaled background, insert after the gsettings command: gsettings set org.gnome.desktop.background picture-options 'scaled'
 
9 months ago

goose
Not really, oros; the only issue you would run into is if you're running more than one monitor, otherwise you can just set your wallpaper size to "scale", which would automagically scale each image to the proper size to match your screen; regarding the complex file names, the script handles all that.  
10 months ago

oros
Nice, but have like 50 pics , all with complex names and different size so this would take days :p  
10 months ago

nicamlg
I had already prepared my pics, but then I learned I had to write an XML in order to gtean slideshow... So I forgot about the idea until now. Thanks. :)  
10 months ago

Ishwon
Nice tutorial. Thanks you.  
10 months ago

Mintification
Excellent. For people looking for live wallpapers, this is a close second, and uses way less memory.  
10 months ago

chassum
Well done.  

Other tutorials from goose

No other tutorials.