- Package:
- gnome-flashback
- Source:
- gnome-flashback
- Description:
- helper application for the GNOME Flashback session
- Submitter:
- Nikolaus Rath
- Date:
- 2023-07-18 11:42:03 UTC
- Severity:
- normal
When starting a Gnome Flashback session, the XDG_SESSION_ID environment variable is not set. This results on applications that rely on logind to not behave properly. Debugging this more closely, I found that XDG_SESSION_ID is still set in ~/.xsession, but seemingly disappears somewhere in this call: exec gnome-session --systemd --session=gnome-flashback --disable-acceleration-check
GNOME Flashback does not do that! That variable is blacklisted by gnome-session: https://gitlab.gnome.org/GNOME/gnome-session/-/blob/main/gnome-session/gsm-util.c#L38
Could this be an unintended side effect of https://salsa.debian.org/gnome-team/gnome-session/-/commit/6f5c3c80be8f92ababd8d6201c5c58e732b47f54?
Apologies if this came across the wrong way. What I mean is that if I select "Gnome Flashback" as the desired session in GDM, and then start a Terminal, the "XDG_SESSION_ID" variable is not defined. If I select e.g. "i3" or regular Gnome in GDM, then the variable is defined. I am not sure what component is at fault, but it is Gnome Flashback users that suffer the consequences. Best, -Nikolaus
Maybe... Why do you need that variable?
I believe this is critical for any program that wants to interact with logind. For example, xss-lock crashes on unlock without it.
retitle 1040920 "Gnome flashback breaks out of logind session" thanks Upon closer examination, the problem is not that GNome flashback unsets XDG_SESSION_ID, but that it breaks out of the active logind session (so unsetting the variable is, in some way, correct). In other desktop environments (vanilla i3 as well as regular Gnome), the desktop environment is correctly associated with a logind session: nikratio@vostro ~> dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.GetSessionByPID uint32:$fish_pid method return time=1689506142.664977 sender=:1.6 -> destination=:1.1126 serial=2461 reply_serial=2 object path "/org/freedesktop/login1/session/_342" When running Gnome Flashback, however: ikratio@vostro ~> dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager.GetSessionByPID uint32:$fish_pid Error org.freedesktop.login1.NoSessionForPID: PID 858156 does not belong to any known session I don't think this is intentional.. or is it? Best, -Nikolaus
Can not you get session id from logind manager using /org/freedesktop/login1/session/auto path? dbus-send --system --print-reply --dest=org.freedesktop.login1 /org/freedesktop/login1/session/auto org.freedesktop.DBus.Properties.Get string:org.freedesktop.login1.Session string:Id
Hi Alberts, I believe that way you can get *a session id*. However, the fact that the dbus query returns an error means that the various X11 processes (those started by gnome-session as well as those started by the user) are actually not part of that session (or any session, for that matter). It's not a matter of determining the session id (even though I first thought that), the problem is that the entire gnome flashback session is not associated with a logind session. Best, -Nikolaus
Hi, I just logged into the Ubuntu GNOME x11 session. The XDG_SESSION_ID environment variable is not set there either. Also GetSessionByPID for gnome-shell returns the same error at least for me. Sorry but you will have to link to relevant documentation if you think that there are real problems. Also I don't think there is much I can do from gnome-flashback to change anything...
Hi Alberts, One example of a real problem is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1040917. https://manpages.ubuntu.com/manpages/impish/man5/org.freedesktop.login1.5.html also seems pretty clear to me: In other words, if this DBus request fails then the specified PID is not part of any logind session. Does that help? Best, -Nikolaus
Hi, Look at this - https://wiki.gnome.org/Initiatives/SystemdUser and related merge requests. As far as I understand, current behaviour is expected one when a session is started/managed by systemd --user. You already confirmed that with --builtin / --systemd test. And this confirms above: https://github.com/systemd/systemd/issues/12399