Package: sway Version: 1.9-1+b1 Severity: wishlist affects: xdg-desktop-portal-wlr tags: patch
Dear Maintainer, starting a screencast (e.g. in FF, obs, ...) is not working out of the box. The xdg-desktop-portal-wlr service won't ever get started and even after starting the service manually it won't actually be used to serve e.g. the ScreenCast DBus API. Digging a bit into the xdg-desktop-portal sources I've leaned that it checks XDG_CURRENT_DESKTOP to determine which portal configuration /usr/share/xdg-desktop-portal/*.conf to use. Without XDG_CURRENT_DESKTOP set: > $ systemctl --user status xdg-desktop-portal-wlr.service > ○ xdg-desktop-portal-wlr.service - Portal service (wlroots > implementation) > Loaded: loaded > (/usr/lib/systemd/user/xdg-desktop-portal-wlr.service; static) > Active: inactive (dead) > > > $ tr '\0' '\n' < /proc/`pidof xdg-desktop-portal`/environ | grep XDG > XDG_DATA_DIRS=/home/fortysixandtwo/.local/share/flatpak/exports/share > :/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/ > XDG_RUNTIME_DIR=/run/user/1000 With XDG_CURRENT_DESKTOP set the portal starts up fine: > $ systemctl --user status xdg-desktop-portal-wlr > ● xdg-desktop-portal-wlr.service - Portal service (wlroots > implementation) > Loaded: loaded (/usr/lib/systemd/user/xdg-desktop-portal- > wlr.service; static) > Active: active (running) since Thu 2024-08-01 12:49:21 CEST; 2 > days ago > Invocation: 0dac5fd40f3744a680f5e97c7a16eca2 > Main PID: 4146 (xdg-desktop-por) > Tasks: 7 (limit: 38328) > Memory: 10M (peak: 11.4M) > CPU: 91ms > CGroup: > /user.slice/user-1000.slice/user@1000.service/app.slice/xdg-desktop- > portal-wlr.service > └─4146 /usr/libexec/xdg-desktop-portal-wlr > > Aug 01 12:49:21 zeus systemd[3005]: Starting xdg-desktop-portal- > wlr.service - Portal service (wlroots implementation)... > Aug 01 12:49:21 zeus systemd[3005]: Started xdg-desktop-portal- > wlr.service - Portal service (wlroots implementation). > > > > $ tr '\0' '\n' < /proc/`pidof xdg-desktop-portal`/environ | grep > XDG > XDG_DATA_DIRS=/home/fortysixandtwo/.local/share/flatpak/exports/share > :/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/ > XDG_RUNTIME_DIR=/run/user/1000 > XDG_CURRENT_DESKTOP=sway thank you for maintaing sway! -- System Information: Debian Release: trixie/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.9.10-amd64 (SMP w/32 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages sway depends on: ii libc6 2.39-6 ii libcairo2 1.18.0-3+b1 ii libevdev2 1.13.2+dfsg-1 ii libgdk-pixbuf-2.0-0 2.42.12+dfsg-1 ii libgl1-mesa-dri 24.1.5-1 ii libglib2.0-0t64 2.80.4-1 ii libinput10 1.26.0-1 ii libjson-c5 0.17-1+b1 ii libpango-1.0-0 1.54.0+ds-1 ii libpangocairo-1.0-0 1.54.0+ds-1 ii libpcre2-8-0 10.42-4+b1 ii libpixman-1-0 0.42.2-1+b1 ii libsystemd0 256.4-2 ii libudev1 256.4-2 ii libwayland-client0 1.23.0-1 ii libwayland-cursor0 1.23.0-1 ii libwayland-server0 1.23.0-1 ii libwlroots12t64 0.17.4-1+b1 ii libxcb-icccm4 0.4.1-1.1+b1 ii libxcb1 1.17.0-2 ii libxkbcommon0 1.6.0-1+b1 ii polkitd 124-3 ii swaybg 1.2.1-1 Versions of packages sway recommends: ii foot 1.17.2-3 ii sway-backgrounds 1.9-1 ii wmenu 0.1.9-2 Versions of packages sway suggests: pn swayidle <none> pn swaylock <none> ii xdg-desktop-portal-gtk 1.15.1-1+b1 ii xdg-desktop-portal-wlr 0.7.1-1+b1 -- Configuration Files: /etc/sway/config.d/50-systemd-user.conf changed [not included] -- no debconf information
From bf5e7b6f73fdd673f5df641377f5372f79b17403 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras <devrtz-deb...@fortysixandtwo.eu> Date: Sun, 4 Aug 2024 06:45:56 +0200 Subject: [PATCH] config: Set XDG_CURRENT_DESKTOP xdg-desktop-portal looks at XDG_CURRENT_DESKTOP to determine which portal implementation to start. Without this envrionment variable set the xdg-desktop-portal-wlr will not be started rendering e.g. screen casts unusable. Closes: #-1 --- debian/config.d/50-systemd-user.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/config.d/50-systemd-user.conf b/debian/config.d/50-systemd-user.conf index af204fb6..4b714f03 100644 --- a/debian/config.d/50-systemd-user.conf +++ b/debian/config.d/50-systemd-user.conf @@ -3,7 +3,7 @@ # see also https://github.com/swaywm/sway/issues/5732 # and https://github.com/systemd/systemd/blob/dfc637d0ff756889e8e5b7cb4ec991eb06069aa1/xorg/50-systemd-user.sh -exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK +exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP exec hash dbus-update-activation-environment 2>/dev/null && \ - dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK + dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP -- 2.45.2
signature.asc
Description: This is a digitally signed message part