-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shouldn't add XDG_SESSION_ID to dbus and systemd activation environment #271
Comments
A minimal solution is to apply the equivalent of GNOME/gnome-session@646b9bc to mate-session-manager, but all the commits mentioned in linuxmint/cinnamon-session#141 (comment) touch the same file and would be good fixes to have. |
Things like XDG_SESSION_ID should not be uploaded to the environment. For example this is broken currently: 1. SSH to your machine 2. Log in to MATE Shell 3. Log out 4. Log in again 5. Lock the screen 6. Try to unlock You can't, and this is because the XDG_SESSION_ID from the first session (step 2) has leaked through to the second one (step 4), and so MATE Shell is listening to the `logind` `UnlockSession` signal for the wrong session. The SSH session established in step 1 serves to keep the `systemd --user` instance alive, so that the state is not torn down between logins. Original patch for GNOME by Iain Lane <[email protected]>. Patch ported over to MATE's session manager by Mike Gabriel <[email protected]>. Fixes mate-desktop#271
@smcv 1 - Remove some session-specific environment variables from activation environment: 2 - Fix environment variables patterns that are accepted: 3 - Never try to autostart systemd: 4 - Continue if a client exits during EndSession signal: 5 - Log a critical when our SIGTERM/SIGINT handler fails to log out: 6 - Stop dbus-daemon instead of restarting it: 7 - Warn about failures to update the environment: 8 - Log variables excluded from environment upload: 9 - Create the config directory with 0700: 10 - Fix typos in DBus documentation: 11 - Mention that session saving does not work on systemd: 12 - Find user's graphical session, not the current pid's session: All those patches are ported from gnome-session git commits (and, modified as needed, in some rare cases). There are more details about each patch within the patch file itself (copied from gnome-session commit descriptions). I haven't noticed any issues by now (built, installed and launched without any issues...). As I've noticed sessions were not always properly saved / restored in my Mate Desktop (some rare cases, but still...), I've decided to give all this a try. I know some of those patches (a majority of them, in fact ;-)) are not related to this issue at all, but considering I went through all recent git commits of gnome-session, I've decided to simply pull anything that seemd to me appropriate for mate. I am publishing all that here, in case anyone is interested for any part of that... |
I'm not a MATE developer or user, so someone from MATE should review those changes, but I think the general principle of sharing non-GNOME-specific fixes between GNOME and MATE is a good one. |
Pull request please. |
Steps to reproduce the behaviour
Expected behaviour
mate-session-manager
uploads some environment variables todbus-daemon --session
viaUpdateActivationEnvironment
, and eithermate-session-manager
itself ordbus-daemon
passes on those environment variables tosystemd --user
viaSetEnvironment
systemd --user
anddbus-daemon --session
processes are shared between multiple login sessions, these environment variables should not include things that are highly specific to one login session, and in particularXDG_SEAT
,XDG_SESSION_ID
andXDG_VTNR
systemd --user
, including most of GNOME, do not inheritXDG_SESSION_ID
XDG_SESSION_ID
, correctly determines its own systemd-logind session ID (in my example, session ID 6) by querying systemd-logind, and can lock and unlock correctlyActual behaviour
mate-session-manager
sends all environment variables tosystemd --user
, includingXDG_SESSION_ID=4
in my examplesystemd --user
alive,XDG_SESSION_ID=4
stays in the activation environment and is "leaked" into the subsequent GNOME sessionXDG_SESSION_ID=4
fromsystemd --user
, even though that login session has already endedgnome-session
to work around this, but I don't think it's really a GNOME bugMATE general version
1.24.1 (not tested with 1.24.2, but none of the changes since 1.24.1 seem like they would affect this)
Package version
1.24.1-1
Linux Distribution
Debian 11
Link to bugreport of your Distribution (requirement)
linuxmint/cinnamon-session#141 (comment) lists some other related fixes in the ancestor project gnome-session. It would be a good idea to incorporate those into mate-session-manager at the same time.
Related bug reports:
The text was updated successfully, but these errors were encountered: