Animated Desktop Background f36

Maybe ‘animate’ is the wrong word. Transition would be better, but most references call it animation.
The default f36 jelly landscape background fades from the daytime light image to the nighttime dark image, and back. I am attempting to replicate this with any photo. When I edit a copy of the .xml file found in “/usr/share/backgrounds/f36/default/f36.xml” I can’t add it as the background by right click. I have tried the gnome settings terminal command, and confirmed that it changes something. However the actual image displayed as background does not change.
Does anyone understand how this feature works? Is it a permission associated with the new file that must change?

2 Likes

You can achieve this as follows:

First way - Hard way:

  1. Makes a directory at /home/user/.local/share/ called backgrounds

  2. Make a directory inside the background directory where you are going to put the two images you want. For this case we call it test. (/home/user/.local/share/background/test)

  3. Put the two images in the test directory. We will call them test-l and test-d

  4. Inside this directory we create an html file called test.xml with the following content:

<background>
  <starttime>
    <year>2022</year>
    <month>05</month>
    <day>24</day>
    <hour>8</hour>
    <minute>00</minute>
    <second>00</second>
  </starttime>
<!-- This animation will start at 8 AM. -->

<!-- We start with day at 8 AM. It will remain up for 10 hours. -->
<static>
<duration>36000.0</duration>
<file>/home/user/.local/share/backgrounds/test/test-l.jpg</file>
</static>

<!-- Day ended and starts to transition to night at 6 PM. The transition lasts for 2 hours, ending at 8 PM. -->
<transition type="overlay">
<duration>7200.0</duration>
<from>/home/user/.local/share/backgrounds/test/test-l.jpg</from>
<to>/home/user/.local/share/backgrounds/test/test-d.jpg</to>
</transition>

<!-- It's 8 PM, we're showing the night till 6 AM. -->
<static>
<duration>36000.0</duration>
<file>/home/user/.local/share/backgrounds/test/test-d.jpg</file>
</static>

<!-- It's 6 AM, and we're starting to transition to day. Transition completes at 8 AM. -->
<transition type="overlay">
<duration>7200.0</duration>
<from>/home/user/.local/share/backgrounds/test/test-d.jpg</from>
<to>/home/user/.local/share/backgrounds/test/test-l.jpg</to>
</transition>

</background>
  1. We create a directory in /home/user/.local/share/ named gnome-background-properties (/home/user/.local/share/gnome-background-properties)

  2. Inside this last directory we create an xml file named test.xml with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
    <wallpaper deleted="false">
        <name>Test</name>
        <filename>/home/user/.local/share/backgrounds/test/test-l.jpg</filename>
	<filename-dark>/home/user/.local/share/backgrounds/test/test-d.jpg</filename-dark>
        <options>zoom</options>
        <shade_type>solid</shade_type>
        <pcolor>#51a2da</pcolor>
        <scolor>#294172</scolor>
    </wallpaper>

    <wallpaper deleted="false">
        <name>00 Test Time of Day</name>
        <filename>/home/user/.local/share/backgrounds/test/test.xml</filename>
        <options>zoom</options>
    </wallpaper>
</wallpapers>

Note: Remember to replace user with your user name

Before:


After:

Second way - Easy way

Install the application Dynamic Wallpaper by Dušan Simić. It allow you to create the dynamic wallpaper and with the extension Night Theme Switcher by rmnvgr you can set the time of day for the wallpaper to change automatically.

For GNOME 43 all this will be unnecessary because we can set the time of day when we want the wallpaper to change from light to dark mode.

4 Likes

Very interesting… I tried to mimic the ‘default’ structure in the default location. [/usr/share/backgrounds/] That required root everything to copy, move, and edit the files.
Your approach copies the structure into a directory I don’t need shenanigans to change. Simple and brilliant! I never would have thought of that
[facepalm]
Thank You hina18

Hmmm, I’m still struggling with it. I replicated your process with my username and paths, both xml files. But I’m not getting a result.
Can you clarify line 15 of the second file?
<name>00 Test Time of Day</name>
Is this calling the other file by name? Or just getting system time?
I will proofread it again with fresh eyes.

Major thanks to Hina18 for getting that answer together. Very comprehensive. But it took me a LONG time to understand what I was reading. If anyone in the future is trying to figure this out…

  1. I hope Gnome 43 is an option for you
  2. The xml files method above really works.
    If you put both files in EXACTLY those file paths the system just finds them. Not magic, just the Gnome architecture. I was stubbornly trying to make my changes in the ‘usr’ instead of under one specific user.
    Following the instructions above I was able to transition ‘stock’ desktop images in a customized way. The file located in gnome-desktop-properties can point to image files anywhere on your system. It must also point to the first xml file with the timing instructions.

Great, I’m glad you were able to do it :smiling_face:

It would be great if you could mark the comment as ‘Solution’ to imply that the problem has been fixed and guide new people to find the solution faster.

Hello again hina18,
What ‘language’ is the above .xml written in? Specifically what other options are available for transition?
I am curious if the transition can pan, zoom etc. It looks like css, but I don’t find any other references to overlay as used in, “”
Thanks All

Meant to say transition = overlay but the line of code I pasted is not allowed.

For GNOME 43 all this will be unnecessary because we can set the time of day when we want the wallpaper to change from light to dark mode.

Hello again hina18 and all of askfedora,
Can anyone provide an update or how to apply this feature of GNOME 43? It is now late Nov. 2022, I am running fedora 37 by upgrade. I see small improvements in G43, but nothing new relating to timing a desktop transition.
Also the “hard way” solution described above still works after the upgrade. I have seven modified ‘drool’ images sliding through the spectrum every few hours.