From dd4fa3daea558dd5d95a7ffce5178b9e1faeaeef Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Thu, 22 May 2025 13:40:15 +0530 Subject: [PATCH] update $WAYLAND_DISPLAY and $DISPLAY post login The $WAYLAND_DISPLAY and $DISPLAY are prone to change between `greetd`'s initialization and the user's login. Therefore, update these environment variables so systemd services and/or d-bus services use the correct values post login. --- data/start-cosmic | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/start-cosmic b/data/start-cosmic index 4f6c80a..d5b6a01 100755 --- a/data/start-cosmic +++ b/data/start-cosmic @@ -40,7 +40,13 @@ export DCONF_PROFILE=cosmic if command -v dbus-update-activation-environment >/dev/null; then # set environment variables for new units started by user service manager - dbus-update-activation-environment --systemd XDG_SESSION_TYPE XDG_CURRENT_DESKTOP DCONF_PROFILE + dbus-update-activation-environment --systemd \ + DCONF_PROFILE \ + DISPLAY \ + WAYLAND_DISPLAY \ + XDG_CURRENT_DESKTOP \ + XDG_SESSION_TYPE \ + # EOF fi # Run cosmic-session if [[ -z "${DBUS_SESSION_BUS_ADDRESS}" ]]; then