Home » Questions » Computers [ Ask a new question ]

How to change wallpaper from command line in KDE 4.3?

How to change wallpaper from command line in KDE 4.3?

Basically question is in title, but let's elaborate a bit:

Asked by: Guest | Views: 88
Total answers/comments: 4
Guest [Entry]

A trivial solution is to change your wallpaper type in Appearance Settings to slide show, point the directory to the one where your downloaded images can be found, and set an interval thereafter you want a new wallpaper.
Guest [Entry]

In general, dcop was replaced by dbus. Dbus, like dcop, is an inter-application communication system, but dbus is not specific to KDE. Each dbus-using program exports an interface of methods that can be called, and signals that can be watched (kind of like the interface of an object in OOP). Anyway, the particular program you want is most likely Plasma, the KDE4 desktop shell. To browse the dbus interface of a program, I suggest D-Feet, a graphical dbus explorer and debugger. Once you find the dbus method in Plasma's interface for changing the wallpaper (If there isn't one, file a bug. There should be.), you can use D-Feet to figure out how to call it, and even test calling it. Then you want to use the dbus-send program to call this dbus method from the command-line.
Guest [Entry]

"Use the scripted image wallpaper plugin. Im afraid there is no way to set a wallpaper by a simple command without scripted image.

Tom"
"Use the scripted image wallpaper plugin. Im afraid there is no way to set a wallpaper by a simple command without scripted image.

Tom"
Guest [Entry]

"This command worked for me, in Plasma Desktop v5,
qdbus org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript 'var allDesktops = desktops();print (allDesktops);for (i=0;i<allDesktops.length;i++) {d = allDesktops[i];d.wallpaperPlugin = ""org.kde.image"";d.currentConfigGroup = Array(""Wallpaper"", ""org.kde.image"", ""General"");d.writeConfig(""Image"", ""file:///home/me/image.png"")}'

Just replace the path written at the end of this command with the correct path of your wallpaper image. Found here."