How to add dynamic wallpapers to Gnome settings / Change backgrounds?

I know that various topics previously covered the creation of Dynamic Wallpapers with XML files such as:

There is even a convenient app called Dynamic Wallpaper Editor

And while this all works, how does one integrate dynamic wallpapers in Gnome?

Simply placing wallpapers in usr/share/backgrounds is not enough. On Fedora, even if you install wallpapers from previous releases from the repositories (which includes the .xml file for transitions) none of the installed wallpapers show up in the settings. You then still have to manually add them with the [Add picture...] button and use some other tool to make it dynamic.

So how do you add dynamic wallpapers on a system level?
(So that they are easy to switch without 3rd party tools or scripts and accessible for multiple users?) Does anyone know how the Zorin team added the mountain dynamic wallpaper to show up in the Change background dialogue of Gnome?

Try

Sorry, but this does not answer my question. My question was not for 'live' wallpapers.

I would like to know how to add a dynamic wallpaper, one that changes according to the time of the day, like Zorin's default wallpaper, to the Settings like so:

1 Like

carmar answered your question. the tutorial is about live wallpapers or dynamic wallpapers, call them however you want

1 Like

Are you sure?
As far as I know..Live wallpapers are those which act as a video wallpaper but dynamic wallpaper are those which have images that change with time like a slideshow. The only difference between a dynamic wallpaper and a slideshow is that the dynamic wallpaper consists of images of a particular object that depict the different times of the day. The default Zorin os wallpaper is a dynamic wallpaper.

I think the principle is the same. live wallpapers, the ones you are speaking about, have just a shorter interval, making more changes in less the time, making the dynamic wallpaper appear like a video

1 Like

This is how I added a 24-hour dynamic background. It requires five images for the transition, plus Gnome Tweaks to install (I've yet to work out a more elegant way of setting the background.)

In /usr/share/backgrounds create a folder and place images for twilight, sunrise, day, evening, and night, e.g., Twilight.jpg, Sunrise.jpg etc. In this example, I've called the background “desert-sands” and the file, desert-sands-timed.xml.

Next, create an XML files as follows:

<background>
	<starttime>
		<year>2022</year>
		<month>3</month>
		<day>30</day>
		<hour>5</hour>
		<minute>0</minute>
		<second>0</second>
	</starttime>

	<static>
		<file>/usr/share/backgrounds/desert-sands/Twilight.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/desert-sands/Twilight.jpg</from>
		<to>/usr/share/backgrounds/desert-sands/Sunrise.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/desert-sands/Sunrise.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/desert-sands/Sunrise.jpg</from>
		<to>/usr/share/backgrounds/desert-sands/Day.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/desert-sands/Day.jpg</file>
		<duration>28800.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/desert-sands/Day.jpg</from>
		<to>/usr/share/backgrounds/desert-sands/Evening.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/desert-sands/Evening.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/desert-sands/Evening.jpg</from>
		<to>/usr/share/backgrounds/desert-sands/Twilight.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/desert-sands/Twilight.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>7200.0</duration>
		<from>/usr/share/backgrounds/desert-sands/Twilight.jpg</from>
		<to>/usr/share/backgrounds/desert-sands/Night.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/desert-sands/Night.jpg</file>
		<duration>18000.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/desert-sands/Night.jpg</from>
		<to>/usr/share/backgrounds/desert-sands/Twilight.jpg</to>
	</transition>
</background>

To activate the background, go to Tweaks > Appearance and select the XML file for Background and Lock Screen images.

I'm not certain how to add the background permanently to Settings > Background.

4 Likes

Okay, here's how to add your wallpapers permanently to Settings > Background.

Create the following XML file in /usr/share/gnome-background-properties. I called this my-wallpapers.xml, and you can add all your custom background here. Also, note that this folder requires root privileges. Alternatively, you could install in ~/.local/share/backgrounds.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
  <wallpaper>
    <name>Desert Sands</name>
    <filename>/usr/share/backgrounds/desert-sands/desert-sands-timed.xml</filename>
    <options>zoom</options>
    <pcolor>#000000</pcolor>
    <scolor>#000000</scolor>
    <shade_type>solid</shade_type>
  </wallpaper>
</wallpapers>

3 Likes

Sorry for not replying sooner (I recently became a parent :grin:, so I had other things to worry about). But this is the solution I was looking for. It requires a bit of work when adding many wallpapers. However, in the end the wallpapers are available for all users in the settings menu.

Thank you for taking the time to figure out how this was done. :pray:

1 Like

I wanted to know the same thing and I thought this would solve my issue (Wallpaper and dynamic wallpaper not showing up in the gnome wallpaper settings) but unfortunately it did not - well: It did show up in the gnome settings but the dynamic wallpaper only showing the Night Pic :thinking:

So here is what I did:

I copied the xml file from the zorin dynamic wp, adjusted it and put it in a new directory with all the Pics in that new directory in /usr/share/backgrounds.
Then - as I read here - I did the same with the xml file in the /gnome-background-properties.

Can someone quickly check if he finds something wrong? I had to adjust the timing as I have 7 and not 5 Pics.

Here is the xml for the dynamic pics

EDIT: don't bother, see next post

<background>
	<starttime>
		<year>2022</year>
		<month>4</month>
		<day>30</day>
		<hour>17</hour>
		<minute>40</minute>
		<second>0</second>
	</starttime>

	<static>
		<file>/usr/share/backgrounds/horizon/Twilight.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/horizon/Twilight.jpg</from>
		<to>/usr/share/backgrounds/zorin-mountain/Morning.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/horizon/Morning.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/horizon/Morning.jpg</from>
		<to>/usr/share/backgrounds/horizon/Sunrise.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/horizon/Sunrise.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/horizon/Sunrise.jpg</from>
		<to>/usr/share/backgrounds/horizon/Day.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/horizon/Day.jpg</file>
		<duration>21600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/horizon/Day.jpg</from>
		<to>/usr/share/backgrounds/horizon/Day_late.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/horizon/Day_late.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/horizon/Day_late.jpg</from>
		<to>/usr/share/backgrounds/horizon/Evening.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/horizon/Evening.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/horizon/Evening.jpg</from>
		<to>/usr/share/backgrounds/horizon/Twilight.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/horizon/Twilight.jpg</file>
		<duration>3600.0</duration>
	</static>

	<transition type="overlay">
		<duration>7200.0</duration>
		<from>/usr/share/backgrounds/horizon/Twilight.jpg</from>
		<to>/usr/share/backgrounds/horizon/Night.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/horizon/Night.jpg</file>
		<duration>18000.0</duration>
	</static>

	<transition type="overlay">
		<duration>3600.0</duration>
		<from>/usr/share/backgrounds/horizon/Night.jpg</from>
		<to>/usr/share/backgrounds/horizon/Night_Twilight.jpg</to>
	</transition>
</background>

and the other one in gnome-background-properties

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
  <wallpaper>
    <name>Day</name>
    <filename>/usr/share/backgrounds/Day.jpg</filename>
    <options>zoom</options>
    <pcolor>#000000</pcolor>
    <scolor>#000000</scolor>
    <shade_type>solid</shade_type>
  </wallpaper>
  <wallpaper>
    <name>Horizon</name>
    <filename>/usr/share/backgrounds/horizon/horizon.xml</filename>
    <options>zoom</options>
    <pcolor>#000000</pcolor>
    <scolor>#000000</scolor>
    <shade_type>solid</shade_type>
  </wallpaper>
</wallpapers>

Okay, I tried to copy it one to one with just 5 Pictures and at the moment it shows me the right one. I guess I will see late if it actually works.
Questions remains then: What did I do wrong... And in this exact moment I am thinking of something:
I added 2 Pictures and took away 2 hours from the Day Pic.
How many hours do we need all in all if we always have transitions? Still 24 I would say. And I just counted all my hours and got 26. But why would it only show the night all the time. I did not change the night duration and I only got 2 hours to many. So it would cycle trough all Pic in 26 instead of 24 hours but that does not seem the case :exploding_head:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.