Make use of XML wallpapers in Plasma 5.27

Hi there,

I’m just playing around with some (XML) wallpapers. ATM I have an avif file and the dynamic wallpaper plugin installed. Works.

But I read that starting with 5.26 XML wallpapers are natively supported. But how can I? Google ends up in the plasma5-wallpaper-xml plugin that says it’s deprecated and feature is included in Plasma 5.26.

So if I want to have a XML wallpaper (consisting of multiple jpg/png and a xml) e. g. from here https://github.com/saint-13/Linux_Dynamic_Wallpapers → Lakeside wallpapers. So where to put these so they get detected and I can select them? Which background-type to select in the background dialog?

I’m somehow lost in this quite easy topic. What am I missing?

Thanks all!

I also don’t know exactly how to do, but there is an widget :

It has dependencies :

cmake extra-cmake-modules git plasma-framework qt5-base qt5-declarative qt5-location

I guess it might gets installed when installing it from wallpaper widgets :



There is a guide I found which had explained how should we apply them.

As an example they had used MacOS wallpaper, which you can change according to your convenience :



Will this was of any help ?

I already got Dynamic Wallpaper in place, but I read that XML is supported natively since 5.26. Hmm…

But thanks for the detailed answer!

No. It’s from two years ago, it’s completely outdated. If you don’t know how to do it, why reply to questions like these, with “answers” that took you 5 minutes to look up online? You only add confusion by doing so.

And why you assume that the person asking the question didn’t take at least that much time trying to figure out the solution? The OP probably did a lot more research than you on this topic.

Let’s start by “how exactly do you want dynamic to function?”

Plasma has a build-in Slideshow wallpaper/image type, where you can select a custom folder, for the images, and custom time for image change, and other nice settings.
No need for .xml or anything to install in some way.
Save your preferred images in a folder and set your preferred way of randomization and image view in the Change Background page.

What I try to achieve is setting up a wallpaper changing between my three pics during the day at a certain time. E. g:

  • dusk_dawn.jpg from 6h-10h & 18h-22h
  • night.jpg from 22h-6h
  • day.jpg from 10h-18h

I currently do this with “dynamic wallpaper” plugin that takes the pics and a json with “instructions” and converts it to an avif file. That’s inconvenient and needs an outdated plugin.

I can obviously do the same with jpgs and a xml file like gnome does.

As of announcement since 5.26 plasma can do this natively(!) - my preference.

So if I create a xml and my pics (or use any other wallpaper set from the web) where to put the files xml / jpg? How can I make the wallpaper settings dialog aware of it? I can only choose picture(s) and no xml file when background-type is set to picture. A slideshow can rotate through a directory but only with a fixed display time.

When I want xml I end up with google recommending the (outdated) xml wallpaper plugin. That’s where I’m stuck.

I don’t think the announcement said something like this exactly… :person_shrugging:
Can you post a link to the page with that info?
From what I have quickly read, a lot of improvements were done on wallpapers, but not exactly “bring dynamic wallpapers natively in Plasma” :person_shrugging:

What you actually want to do, I couldn’t find a way with the native plugins.
Nevertheless, it might be possible with some timer (systemd, or kde), to trigger wallpaper change, with specific paths for each alarm.

Of course, you can do anything with a custom (bash) script :wink: .

If you want to go the script way, you can use this command:

plasma-apply-wallpaperimage /path/to/pic.jpg

The only drawback is the fact that this command don’t let you choose a specific screen.

1 Like

Inofficially: https://store.kde.org/p/1755433
@Reddit channel: https://www.reddit.com/r/kde/comments/vheg6i/didnt_plasma_525_have_support_for_dynamic/

But if I read it again it seems as this “support” means switching wallpaper automatically depending on light / dark theme. Not the other cool stuff the xml addon can do with evaluating current time etc like gnome does.

But if this doesn’t work yet then I’ll stay with dynamic wallpaper plugin and the avif for a while.

Already thought about that. I already wrote a little “themer” script that applies theme/colors/wallpapers and additionally konsole vs code theme settings to look ‘perfect’ for all apps :wink: - I use plasma-apply-* in there a lot.

Let’s see if there’s rainy weather this weekend :wink:

BTW, during browsing 5.26 Changelog, I saw that they added support for avif format in wallpaper images, if that makes things easier. :wink:

@PeterRies

Can you provide that XML, so that I can also try to know how can I apply it ?

Of Course

That is the file LakeTheCliff.xml in /usr/share/backgrounds/Dynamic_Wallpapers:


<!-- Generated by com.github.maoschanz.DynamicWallpaperEditor -->
<background>
	<starttime>
		<year>2018</year>
		<month>1</month>
		<day>1</day>
		<hour>6</hour>
		<minute>0</minute>
		<second>0</second>
	</starttime>

	<static>
		<file>/usr/share/backgrounds/Dynamic_Wallpapers/LakeTheCliff/LakeTheCliff-0.jpg</file>
		<duration>42300.0</duration>
	</static>

	<transition type="overlay">
		<duration>900.0</duration>
		<from>/usr/share/backgrounds/Dynamic_Wallpapers/LakeTheCliff/LakeTheCliff-0.jpg</from>
		<to>/usr/share/backgrounds/Dynamic_Wallpapers/LakeTheCliff/LakeTheCliff-1.jpg</to>
	</transition>

	<static>
		<file>/usr/share/backgrounds/Dynamic_Wallpapers/LakeTheCliff/LakeTheCliff-1.jpg</file>
		<duration>42300.0</duration>
	</static>

	<transition type="overlay">
		<duration>900.0</duration>
		<from>/usr/share/backgrounds/Dynamic_Wallpapers/LakeTheCliff/LakeTheCliff-1.jpg</from>
		<to>/usr/share/backgrounds/Dynamic_Wallpapers/LakeTheCliff/LakeTheCliff-0.jpg</to>
	</transition>
</background>

and in /usr/share/gnome-background-properties there’s another file with information about that xml file (only then detected by XML wallpaper plugin, but not sure if needed in native Plasma)

/usr/share/gnome-background-properties/LakeTheCliff.xml:

<?xml version="1.0"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
  <wallpaper deleted="false">
    <name>Lake the Cliff</name>
    <filename>/usr/share/backgrounds/Dynamic_Wallpapers/LakeTheCliff.xml</filename>
    <options>zoom</options>
    <shade_type>solid</shade_type>
    <pcolor>#3465a4</pcolor>
    <scolor>#000000</scolor>
  </wallpaper>
</wallpapers>

1 Like

How/Where can I select this filetype? Default filetype let me only select picture files like png/jpg but no avif. This is only possible when installing the Dynamic Wallpaper Plugin…

If you have avif file, then directly right click it to set as wallpaper.

By this method I can also set a gif as my wallpaper as well, and I had tried this one.

1 Like

just found this one:

so natively dark/light theme wallpapers and support for avif and heic files via dolphin → properties → set as wallpaper.

Additionally I contacted the plasma5-xml-wallpaper author for clarification how his plugin should now work nativley as he stated himself that his plugin is now deprecated.

Will report his answer here. Thanks for any contributions up to now :heartbeat:

Just tried the “Set as wallpaper” option from Dolphin with avif and heic as offered. No luck - it just sets the Next (mountains) default/fallback wallpaper… So no luck at all without the deprecated plugins :confused: