GNOME Bugzilla – Bug 746492
user switching from autologin session doesn't work
Last modified: 2015-03-20 00:28:06 UTC
Right now, if you have autologin session and try to user switch it just hangs. Ideally, we'd start the login screen on VT1 in the background, but mutter and Xwayland don't support that right now, so instead we'll keep autologin on vt1 and start the login screen on an auxilliary VT on demand.
Created attachment 299886 [details] [review] session: never use LOGIND_MANAGED session display mode Neither wayland nor X11 is ready to be fully logind managed, yet, including the login screen. This commit makes sure we never use it.
Created attachment 299887 [details] [review] manager: drop spurious whitespace
Created attachment 299888 [details] [review] manager: move ran-once-marker file to later This will let us move automatic login handling later, which we need to fix which VT it starts on.
Created attachment 299889 [details] [review] manager: drop ran-once marker file The file is not anymore useful than a boolean on the manager state object now, that everything is merged into one process. This commit gets rid of it, since a boolean is simpler.
Created attachment 299890 [details] [review] manager: drop start_automatic_login_conversation_if_necessary It only needs to be called in one place, and that one place already does most of the logic of that function, so we can simplify the code a little by consolidating the two functions.
Created attachment 299891 [details] [review] manager: split automatic login handling out of set_up_greeter_session Automatic login handling doesn't have a whole lot to do with the greeter session, so having it in setup_greeter_session is a little weird. This commit splits set_up_greeter_session into two functions, set_up_greeter_session and set_up_automatic_login_session, and then changes the caller to call the right one depending on if the display should do automatic login..
Created attachment 299892 [details] [review] manager: drop unused variable
Created attachment 299893 [details] [review] display: move gdm_display_get_timed_login_details to manager The function is no longer virtualized among the display types, and it doesn't actually have a full picture of whether or not the display should do automatic/timed login so move it up to the manager, where all the information is.
Created attachment 299894 [details] [review] manager: split get_timed_login_details_for_display into two functions The function is only ever called in two distinct ways: 1) to check about timed login 2) to check about automatic login. Since it's used in completely distinct ways and has somewhat distinct implementations for each, split it up into two functions for clarity.
Created attachment 299895 [details] [review] manager: don't pass display to functions that fetch timed/autologin details The only reason we need the display for autologin is to know if it's running on seat0 or not. Going forward we won't necessarily have a display up front, so drop the parameter, and just check the seat in the caller. For symmetry, drop the display paramater timed login, too, and do the display related checks in the lone caller.
Created attachment 299896 [details] [review] manager: move initial login handling to function After the greeter is started, we may start any pending initial-setup login from the user. Right now we do that directly from on_display_status_changed. This commit moves the code off to a subroutine, since it's only going to get more complicated in the future.
Attachment 299886 [details] pushed as 03c565d - session: never use LOGIND_MANAGED session display mode Attachment 299887 [details] pushed as 301c2aa - manager: drop spurious whitespace Attachment 299888 [details] pushed as a3260e2 - manager: move ran-once-marker file to later Attachment 299889 [details] pushed as 56bf2f6 - manager: drop ran-once marker file Attachment 299890 [details] pushed as 5e36a56 - manager: drop start_automatic_login_conversation_if_necessary Attachment 299891 [details] pushed as a93aedf - manager: split automatic login handling out of set_up_greeter_session Attachment 299892 [details] pushed as c6674e7 - manager: drop unused variable Attachment 299893 [details] pushed as a21fbb4 - display: move gdm_display_get_timed_login_details to manager Attachment 299894 [details] pushed as d1e1959 - manager: split get_timed_login_details_for_display into two functions Attachment 299895 [details] pushed as ed31a2b - manager: don't pass display to functions that fetch timed/autologin details Attachment 299896 [details] pushed as 63b0ce1 - manager: move initial login handling to function