How Can I change wallpaper from CLI?

Kevin Krammer krammer at
Thu Sep 6 11:41:58 BST 2012

On Thursday, 2012-09-06, Duncan wrote:

> I'd use the dbus interface (probably ultimately dbus-send from the
> script) to org.kde.ActivityManager to get the current activity, then
> check $KDEHOME/share/config/plasma-desktop-appletsrc[1] for that
> activity, looking for the appropriate wallpaper sections (note that there
> may be multiple desktop containers if the user has multiple monitors,
> each with its own wallpaper and thus wallpaper sections, but at least as
> of kde 4.9, all part of the same activity) and editing them accordingly.
> Then I'd make the appropriate dbus call to either plasma-desktop or to
> kded to trigger a config-changed event so it would reread the file.

Apparently triggering config reparsing wouldn't be sufficient since the config is 
not processed again.

In any case, the thread spawned on the developer lists mentions that there is 
a D-Bus interface for that kind of task in the works.

> [1] The $KDEHOME path defaults to ~/.kde as shipped by kde, if the
> variable isn't set, but many distros change that to ~/.kde4, and of
> course the user can set $KDEHOME in kde's environment to change it to
> whatever filesystem location they wish.  So if you're aiming for a
> specific distro you can use their path if the var isn't set, or check and
> see which one of the two exists if aiming for wider audience.

kde4-config --localprefix

or kwriteconfig when manipulating KDE config files from commandline or script.

Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <>
-------------- next part --------------
This message is from the kde mailing list.
Account management:
More info:

More information about the kde mailing list