| 1 |
System Integration |
| 2 |
================== |
| 3 |
|
| 4 |
D-Bus Activation Environment |
| 5 |
---------------------------- |
| 6 |
|
| 7 |
XDG Desktop Portal and its portal backends are activatable D-Bus services. |
| 8 |
This means that they inherit environment variables from the "activation |
| 9 |
environment" maintained by either ``systemd --user`` (on systems that use |
| 10 |
systemd) or ``dbus-daemon`` (on systems that do not). They do not inherit |
| 11 |
environment variables from the GUI environment or from the shell, unless |
| 12 |
some component of the overall system takes responsibility for taking the |
| 13 |
necessary environment variables from the GUI environment and sending them |
| 14 |
to ``systemd`` or ``dbus-daemon`` to be added to the activation environment. |
| 15 |
|
| 16 |
In integrated desktop environments such as GNOME and KDE Plasma, and in |
| 17 |
OS distributions with a high level of integration, this should be done |
| 18 |
automatically by desktop environment or OS infrastructure. |
| 19 |
|
| 20 |
Variables that might need to be propagated in this way include, but are |
| 21 |
not limited to: |
| 22 |
|
| 23 |
- ``DISPLAY`` |
| 24 |
- ``PATH`` |
| 25 |
- ``WAYLAND_DISPLAY`` |
| 26 |
- ``XAUTHORITY`` |
| 27 |
- ``XDG_CURRENT_DESKTOP`` |
| 28 |
- ``XDG_DATA_DIRS`` |
| 29 |
|
| 30 |
In environments that are assembled out of individual components by |
| 31 |
the user, it is the user's responsibility to ensure that this system |
| 32 |
integration has been done, for example by using |
| 33 |
`dbus-update-activation-environment(1) |
| 34 |
<https://dbus.freedesktop.org/doc/dbus-update-activation-environment.1.html>`_ |
| 35 |
or `systemctl --user import-environment VAR… |
| 36 |
<https://www.freedesktop.org/software/systemd/man/latest/systemctl.html>`_. |
| 37 |
|
| 38 |
Desktop Environment Requirements |
| 39 |
-------------------------------- |
| 40 |
|
| 41 |
The display manager or GUI environment is responsible for setting |
| 42 |
``XDG_CURRENT_DESKTOP`` to an appropriate value. |
| 43 |
|
| 44 |
The GUI environment should provide a |
| 45 |
:doc:`portal configuration file </configuration-file>` with a name based on its |
| 46 |
``XDG_CURRENT_DESKTOP``, to select appropriate portal backends. |
| 47 |
|
| 48 |
The GUI environment should arrange for its required portal backend or |
| 49 |
backends to be installed as dependencies (possibly as optional |
| 50 |
dependencies, if it is packaged in a loosely-coupled operating system). |
| 51 |
|
| 52 |
In environments that are assembled out of individual components by |
| 53 |
the user, it is the user's responsibility to ensure that this system |
| 54 |
integration has been done. |