DBus service for screenshots.

Boudhayan Gupta bgupta at kde.org
Thu Sep 24 15:25:22 PDT 2015


Hi,

In December we'll be releasing a new screenshot app for KDE. We've
implemented a generic DBus interface for this app, and I'm posting
this to the dbus mailing list as others may be interested in this idea
and may want to implement it in their own desktop environments.

The service we've implemented is called org.freedesktop.Screenshot
(we're using the freedesktop namespace because we truly want the
service to be DE or platform agnostic). The XML definition of the
interface is available here:
https://raw.githubusercontent.com/KDE/spectacle/master/dbus/org.freedesktop.Screenshot.xml

You'll notice that we define 4 different types of screenshots that can
be taken, and a StartAgent method. The StartAgent method should just
start the application GUI, the other 4 methods should take the
appropriate shot, save the image in a default location, and quit.

The idea behind this service/interface is that hotkeys can directly
map to methods in this interface (for example, pressing the
PrintScreen key could invoke org.freedesktop.Screenshot.StartAgent,
and any screenshooting application on the system providing this
service could be invoked). This takes the burden of configuration away
from the hotkey manager. This also maps very well to mobile devices,
since a hardware button combination (Power + VolDown on Android, for
example) could invoke org.freedesktop.Screenshot.FullScreen.

Additionally, since Wayland doesn't have a stable API for taking
screenshots yet, Wayland compositors could provide this service, and
handle these methods in whatever secure way they see fit (this is not
intended to be a primary solution for Wayland, however).

Yours,
Boudhayan Gupta
KDE


More information about the dbus mailing list