Starting a process in a Wayland session for data capture

Pekka Paalanen ppaalanen at
Mon Jun 3 11:49:41 UTC 2019

On Mon, 3 Jun 2019 12:24:16 +0200 (CEST)
mmarkd9 at wrote:

> Hi, I'm trying to understand what does it mean for a process to be
> 'started in a Wayland session'. My goal would be to capture screen
> data for an entire desktop session (either KDE or GNOME). I know that
> compositors like mutter provide internal d-bus interfaces to get this
> kind of data and enable RDP operations
> (,
> anyway I'm wondering how would one go in order to launch a process
> able to use these interfaces. This
> paragraph says 


that is all specific to GNOME or distributions, not really Wayland.

> > Starting session services
> > For starting services, there are various alternatives: D-Bus
> > activation, systemd user services, xdg autostart files. Autostart
> > files and systemd services can have conditions that control their
> > activation.  
> Using a .desktop file to enable the xdg autostart seems pretty easy,
> but I don't understand the other two methods (i.e. systemd services
> and D-Bus activation).
> Are these Wayland officially defined ways of starting a user process
> in a Wayland session (or are they gnome-specific)?

Wayland does not define anything about starting processes at all.

"Session" is a concept that exist all around Wayland but not in
Wayland, maybe aside from how to find the Wayland socket to connect to

If I had to define "a Wayland session", I'd probably say it is all the
Wayland clients connected to the same Wayland server instance. However,
usually a "Wayland session" refers to any graphical user session where
applications happen to be using Wayland protocol under the hood instead
of X11. So what you are searching about is more "a user session" and
less "a Wayland session".

User sessions can use a mix of technologies to tie things together into
a session: environment variables, D-Bus session bus, systemd stuff, PAM
(Linux pluggable authentication modules), the process hierarchy,
containers, cgroups, Linux security modules, ...

> In any case what's
> the correct way to start a user process in a Wayland session so that
> it has permissions to grab screen data?

There is no "Wayland way". Desktop Environment and OS distribution
projects define how they manage their processes, which could be
systemd, bash scripts, D-Bus activation, hard-coded into the
compositor, .desktop files, etc., quite likely a mix of some of these.

Everything about "permissions" is also highly DE and OS specific, there
is no single Wayland convention.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the wayland-devel mailing list