l3ib / nitrogen

Background browser and setter for X windows.
http://projects.l3ib.org/nitrogen
GNU General Public License v2.0
358 stars 38 forks source link

Doesn't change wallpaper on KDE Plasma #110

Open hungryseashell opened 6 years ago

hungryseashell commented 6 years ago

On starting up Nitrogen I get the following on Antergos Linux + KDE Plasma 5.11.5 X11 session:

(nitrogen:4102): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",

(nitrogen:4102): Gtk-WARNING **: Unable to locate theme engine in module_path: "adwaita",
UNKNOWN ROOT WINDOW TYPE DETECTED (plasmashell), please file a bug
UNKNOWN ROOT WINDOW TYPE DETECTED (plasmashell), please file a bug
WARNING: More than one Desktop window found:
        0x 1c00016   3 plasmashell
        0x 1c0000e   3 plasmashell

The issue is that when I apply a wallpaper nothing happens. If I log out I can see the wallpaper set by nitrogen for just a moment.


If it is any help (or related at all) here is a description from a deleted reddit user to change wallpapers in the plasma desktop. Copied here:

dbus-send --session --dest=org.kde.plasmashell --type=method_call /PlasmaShell org.kde.PlasmaShell.evaluateScript 'string:
var Desktops = desktops();                                                                                                                       
for (i=0;i<Desktops.length;i++) {
        d = Desktops[i];
        d.wallpaperPlugin = "org.kde.image";
        d.currentConfigGroup = Array("Wallpaper",
                                    "org.kde.image",
                                    "General");
        d.writeConfig("Image", "file:///PATH/TO/IMAGE.png");
}'

Explains it further:

KDE actually stores the wallpaper in ~/.config/plasma-org.kde.plasma.desktop-appletsrc. One can change the value in it, but it will not actually change the wallpaper until Plasma is reloaded. Using the scripting method, writeConfig() saves the configuration and silently reloads Plasma's desktop.

Docs: KDE System Administration: PlasmaDesktopScripting

daf commented 6 years ago

Fantastic piece of code here, thanks @hungryseashell. Will try to get it into the next point release.

pranshu-07 commented 3 years ago

any update? @daf