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 746492 - user switching from autologin session doesn't work
user switching from autologin session doesn't work
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-20 00:26 UTC by Ray Strode [halfline]
Modified: 2015-03-20 00:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
session: never use LOGIND_MANAGED session display mode (2.67 KB, patch)
2015-03-20 00:26 UTC, Ray Strode [halfline]
none Details | Review
manager: drop spurious whitespace (2.80 KB, patch)
2015-03-20 00:26 UTC, Ray Strode [halfline]
none Details | Review
manager: move ran-once-marker file to later (4.67 KB, patch)
2015-03-20 00:26 UTC, Ray Strode [halfline]
none Details | Review
manager: drop ran-once marker file (16.32 KB, patch)
2015-03-20 00:26 UTC, Ray Strode [halfline]
none Details | Review
manager: drop start_automatic_login_conversation_if_necessary (12.71 KB, patch)
2015-03-20 00:26 UTC, Ray Strode [halfline]
none Details | Review
manager: split automatic login handling out of set_up_greeter_session (7.48 KB, patch)
2015-03-20 00:26 UTC, Ray Strode [halfline]
none Details | Review
manager: drop unused variable (2.78 KB, patch)
2015-03-20 00:27 UTC, Ray Strode [halfline]
none Details | Review
display: move gdm_display_get_timed_login_details to manager (22.53 KB, patch)
2015-03-20 00:27 UTC, Ray Strode [halfline]
none Details | Review
manager: split get_timed_login_details_for_display into two functions (14.62 KB, patch)
2015-03-20 00:27 UTC, Ray Strode [halfline]
none Details | Review
manager: don't pass display to functions that fetch timed/autologin details (11.45 KB, patch)
2015-03-20 00:27 UTC, Ray Strode [halfline]
none Details | Review
manager: move initial login handling to function (5.52 KB, patch)
2015-03-20 00:27 UTC, Ray Strode [halfline]
none Details | Review

Description Ray Strode [halfline] 2015-03-20 00:26:32 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.
Comment 1 Ray Strode [halfline] 2015-03-20 00:26:39 UTC
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.
Comment 2 Ray Strode [halfline] 2015-03-20 00:26:43 UTC
Created attachment 299887 [details] [review]
manager: drop spurious whitespace
Comment 3 Ray Strode [halfline] 2015-03-20 00:26:47 UTC
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.
Comment 4 Ray Strode [halfline] 2015-03-20 00:26:51 UTC
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.
Comment 5 Ray Strode [halfline] 2015-03-20 00:26:54 UTC
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.
Comment 6 Ray Strode [halfline] 2015-03-20 00:26:58 UTC
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..
Comment 7 Ray Strode [halfline] 2015-03-20 00:27:02 UTC
Created attachment 299892 [details] [review]
manager: drop unused variable
Comment 8 Ray Strode [halfline] 2015-03-20 00:27:06 UTC
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.
Comment 9 Ray Strode [halfline] 2015-03-20 00:27:11 UTC
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.
Comment 10 Ray Strode [halfline] 2015-03-20 00:27:15 UTC
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.
Comment 11 Ray Strode [halfline] 2015-03-20 00:27:19 UTC
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.
Comment 12 Ray Strode [halfline] 2015-03-20 00:28:06 UTC
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