From 279d440e3dca3f386c56549267824bdeb964f57f Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Sun, 17 May 2026 07:57:10 +0200 Subject: [PATCH] sway: propagate Wayland env to dbus for portal backends Without dbus-update-activation-environment, xdg-desktop-portal-{gtk,wlr} inherit an empty WAYLAND_DISPLAY/SWAYSOCK from the session bus (started by dbus-run-session before sway) and crash on activation. As a result Flatpak apps cannot read color-scheme / gtk-theme from the host and fall back to a light theme. Co-Authored-By: Claude Opus 4.7 --- dotfiles/desktop/.config/sway/config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dotfiles/desktop/.config/sway/config b/dotfiles/desktop/.config/sway/config index bb78f34..008ed8a 100644 --- a/dotfiles/desktop/.config/sway/config +++ b/dotfiles/desktop/.config/sway/config @@ -74,6 +74,9 @@ for_window [class="(?i)polkit"] floating enable for_window [title="^Authentication Required"] floating enable # Autostart — XDG and session services +# Propagate Wayland env to dbus so xdg-desktop-portal backends inherit +# WAYLAND_DISPLAY/SWAYSOCK when dbus-activated (otherwise they crash). +exec dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP exec dex --autostart --environment sway exec gnome-keyring-daemon --start --components=secrets exec_always ~/.config/sway/scripts/setup-gtk-theme.sh