From 8af80292d35fb94d610aa2ef1ccff07d983e7bdf Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Fri, 10 Feb 2023 20:18:57 +0100 Subject: [PATCH] pkg/utils: Preserve the session class In order to work with systemd-logind, a display manager is expected to set the session class [1]. Setting the XDG_SESSION_CLASS environment variable is one way to do that. It's worth noting that the GNOME Display Manager (or GDM) does set XDG_SESSION_CLASS [2] even though GNOME Shell uses other means to differentiate between 'greeter' and 'user' sessions. [1] https://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/ [2] GDM commit 29ebbbb37bb65fad https://gitlab.gnome.org/GNOME/gdm/-/commit/29ebbbb37bb65fad https://bugzilla.gnome.org/show_bug.cgi?id=670100 https://github.com/containers/toolbox/issues/992 --- src/pkg/utils/utils.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pkg/utils/utils.go b/src/pkg/utils/utils.go index f33d0db..0d4b356 100644 --- a/src/pkg/utils/utils.go +++ b/src/pkg/utils/utils.go @@ -86,6 +86,7 @@ var ( "XDG_MENU_PREFIX", "XDG_RUNTIME_DIR", "XDG_SEAT", + "XDG_SESSION_CLASS", "XDG_SESSION_DESKTOP", "XDG_SESSION_ID", "XDG_SESSION_TYPE",