After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677556 - ignore lingering and closing session when determining whether to switch to an existing one
ignore lingering and closing session when determining whether to switch to an...
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-06 14:34 UTC by Matthias Clasen
Modified: 2012-07-09 16:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.91 KB, patch)
2012-07-08 04:36 UTC, Matthias Clasen
accepted-commit_now Details | Review

Description Matthias Clasen 2012-06-06 14:34:31 UTC
Systemd puts user sessions into these states when some processes are slow to go away or just leak. We don't want to switch to these 'ghost' sessions.
Comment 1 Ray Strode [halfline] 2012-06-07 19:36:52 UTC
<halfline> kay: hey around?
<halfline> kay: any idea why there is sd_uid_get_state and not
sd_session_get_state for each individual session ?
<kay> halfline: guess we just don't really care about multiple sessions
belonging to the same uid. you would need that for?
<halfline> kay: well, some sessions "linger" after logout
<halfline> kay: and i don't want gdm to ever jump to those
<halfline> right now gdm will jump to existing running sessions if they exist
instead of creating a new one
<halfline> after the user types their username and password
<kay> halfline: oh, i see
<kay> halfline: vc logins would probably confuse that too
<halfline> well we explicitly check the type
<halfline> and ignore vc logins
<kay> ah. so we need a 'linger' type?
<halfline> well there are two user states that need to map to session states it
hink
<halfline> lingering and closing
<halfline> lingering is when someone wants to keep screen running but otherwise
log out
<halfline> and closing is when pulseaudio stays alive for 10 seconds after
logout
<halfline> both states are currently "user states"
<halfline> but that's kind of wrong, since they're about specific sessions
<kay> yeah
Comment 2 Lennart Poettering 2012-06-21 14:18:35 UTC
in systemd git there's now a new state property on all seats which is one of "online", "active", "closing".

online = logged in
active = logged in and in the fg
closing = nominally logged out but still some left-over around from this session

This is exposed both on the Session bus object as well as in sd_session_get_state().

This should provide everything gdm needs, right?
Comment 3 Ray Strode [halfline] 2012-06-22 02:23:43 UTC
yup sounds perfect.
Comment 4 Matthias Clasen 2012-07-08 04:36:39 UTC
Created attachment 218250 [details] [review]
patch
Comment 5 Matthias Clasen 2012-07-08 04:38:45 UTC
The patch contains an unrelated bugfix, btw: Don't use g_free on a string returned by sd_session_get_type
Comment 6 Ray Strode [halfline] 2012-07-09 14:26:07 UTC
Review of attachment 218250 [details] [review]:

Looks fine, thanks !

::: daemon/gdm-slave.c
@@ +1436,1 @@
 

would be good if this was a separate commit, but good either way.
Comment 7 Matthias Clasen 2012-07-09 16:43:36 UTC
Pushed as two commits