How Can I change wallpaper from CLI?

Kevin Krammer krammer at kde.org
Thu Sep 6 10:47:16 UTC 2012


On Wednesday, 2012-09-05, Aaron J. Seigo wrote:

> what that would do in this case is instead of implementing (non-standard)
> means to set desktop wallpapers in N applications, N applications simply
> start advertising what content the user is focused on so that other parts
> of the system can react.
> 
> that way instead of dozens of different plugins for dozens of applications
> to do something as inane and rarely used as "set this random image i'm
> viewing to be my wallpaper" using a menu item (it's already possible with
> drag and drop), Share Like Connect could simply offer an item when a image
> with a supported mimetype is selected / viewed.
> 
> then nobody needs to worry about plasma shell internals (which can even
> differ between shells, btw, and has changed over time in some shells
> making maintaining such publicly used dbus APIs a PITA) and nobody needs
> to keep writing new plugins for this stuff.

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.

D-Bus interfaces have the advantage of being accessible from almost any 
program technology stack, most times even from shell scripts.

> and how hard is it?
> 
> using namespace KActivities;
> m_resource = new ResourceInstance(window->wId(), this);
> 
> ... some time later ...
> 
> m_resource->setUri(m_currentImage);
> m_resource->setTitle(m_imageTitle);
> m_resource->setMimetype(m_imageMimetype);
> 
> voila.
> 
> 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?

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/plasma-devel/attachments/20120906/ad6036e9/attachment.sig>


More information about the Plasma-devel mailing list