GNOME Bugzilla – Bug 568326
GDM should allow the chooser to display logged-in users only
Last modified: 2010-06-16 23:32:05 UTC
Currently, GDM can either show a list of all users (unwieldy on a system with 100s of users) or the user list can be disabled altogether by setting disable_user_list=true. It would be nice to have a third option: show logged in users only. Thus users who are already logged in to a machine have the convenience of the user chooser mechanism and can just click on their name to resume their session, while non-logged-in users can type in their user name and password. The following patch can by applied on top of the patch I submitted in bugzilla #568323 to implement this. It introduces additional gconf keys: list_logged_in_only -- if true (and disable_user_list is false), only logged-in users will be shown in the chooser list. manual_entry_banner_text -- can be set to allow a system administrator to configure a different banner message in the case when the user list is empty from when it is nonempty. (For example, if list_logged_in_only is true, the main banner message can alert prospective users that the system is in use and can invite users to click on their name to resume their session or select Other... to log in as a different user, and the alternate manual_entry_banner_text can simply say something like "Please enter your user name to begin".) -- this isn't an essential part of the patch. gdm-greeter-login-window.c is altered to allow for the two different kinds of banner messages, and gdm-user-chooser-widget.c is altered by replacing the code around the boolean function "is_user_list_disabled" with new code that uses a three-state variable, the states being USER_LIST_DISABLED, USER_LIST_ENABLED_FULL, or USER_LIST_LOGGED_IN_ONLY. The default wording of the Other... item is also modified to something more appropriate in the USER_LIST_LOGGED_IN_ONLY case. Other information:
Created attachment 126786 [details] [review] Patch allowing gdm to show logged-in users only
Note this is similar to bug #528663.
Created attachment 132284 [details] [review] Updated patch to work with new proposed patch in bug #568323 This is an updated version of the patch, designed now to be used in conjunction with the latest patch proposed in attachment #132283 [details] in bug #568323.
(I also changed the wording of the gconf key to be more consistent with the existing keys. Also, I moved the mechanism for setting different banner text for the nobody-logged-in case versus the somebody-logged-in case into the other bug's patch).
*** This bug has been marked as a duplicate of bug 557553 ***