GNOME Bugzilla – Bug 677556
ignore lingering and closing session when determining whether to switch to an existing one
Last modified: 2012-07-09 16:43:36 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.
<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
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?
yup sounds perfect.
Created attachment 218250 [details] [review] patch
The patch contains an unrelated bugfix, btw: Don't use g_free on a string returned by sd_session_get_type
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.
Pushed as two commits