src/config/session.c: Update dbus / systemd activation environment

This allows xdg-desktop-portal-wlr to work out of the box for screen-recording.
If systemd or dbus is not available the environment update will fail gracefully.

This patch will set XDG_CURRENT_DESKTOP=wlroots but a user may change this by
either having the environment variable set before starting labwc or by having
a different value set in ~/.config/labwc/environment.

Based on PR #461 by @Joshua-Ashton
This commit is contained in:
Consolatis 2022-07-28 01:06:56 +02:00 committed by Johan Malm
parent b8995e45dc
commit d6ea0d68cf
3 changed files with 44 additions and 3 deletions

View file

@ -1,5 +1,8 @@
# Example environment file
# This allows xdg-desktop-portal-wlr to function (e.g. for screen-recording)
XDG_CURRENT_DESKTOP=wlroots
# Set keyboard layout to Swedish
XKB_DEFAULT_LAYOUT=se