How Can I change wallpaper from CLI?

Kevin Krammer krammer at kde.org
Thu Sep 6 13:22:28 BST 2012


On Thursday, 2012-09-06, Aaron J. Seigo wrote:
> On Thursday, September 6, 2012 12:47:16 Kevin Krammer wrote:
> > The problem with that (as far as I can tell) is that this would not be
> > available to non-KDE apps, which (again as far as I understand) is the
> > case of the thread starter.
> 
> if the issue was non-KDE apps, this would be an interesting starting point
> for discussion.

Well, the issue is non-KDE apps or at least one of them (the one of the 
developer asking on how to do change the wallpaper).

> but the discussion moved to the example of a KIPI plugin for digikam.

I considered this an additonal data point, i.e. another interested party in 
changing wallpapers.
However, if we consider this a new subtopic, then somebody should probably 
advise the thread starter on the more generic problem.

> that is a KDE application.

True. 

> once we get our own house in order, then i'd love to discuss about how we
> interface with the rest of the world.

Sure. Meaning that someone has to reply to the original query and write that 
Plasma workspaces currently do not support programmatic changes of wallpaper 
but is something considered for the future.

> > D-Bus interfaces have the advantage of being accessible from almost any
> > program technology stack, most times even from shell scripts.
> 
> qdbus org.kde.ActivityManager /ActivityManager | grep Resource
> 
> we're smart enough to implement things in ways that aren't completely
> stupid. ;)
> 
> 
> and really this is a design question ("is associating URIs and metadata
> with windows a good / better solution? if so, how?"), not an
> implementation problem ("what is used for remote procedure calls?").

I didn't say that D-Bus interfaces were the best or even a good solution just 
that one of their properties is being usable from a lot of program 
environments.

> > > show me a dbus api for wallpaper setting that can do that. :)
> > 
> > Just curious: what kind of non-D-Bus communication mechanism is used by
> > that?
> 
> it uses DBus. the differentiation is that it isn't focused on "making
> something to set a wallpaper" but focused on "allowing content to be
> introspected so that things can be done for/with that content".
> 
> making an API for "setting wallpaper" is not only fragile (see the
> differences in KDesktop 1, 2, 3 and Plasma; see the differences for
> windows, mac, xfce, gnome, etc) it is also very limited in scope and needs
> to be upkept in every single application.

Without checking the implementation details I would have guessed that 
"allowing content to be introspected" needs support for that introspection in 
every single application and that support would need to be updated when the 
introspector changes the way it introspects.

Basically moving the maintenance of API from the target to the source of the 
data.

However, the thread starter might be willing to provide such introspection 
capability if somebody points them to respective interface descriptions.

Cheers,
Kevin

-- 
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: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20120906/e3632659/attachment.sig>


More information about the kde-core-devel mailing list