--- gdm-2.29.5/gui/simple-greeter/Makefile.am-orig	2010-01-14 21:58:28.211501089 -0600
+++ gdm-2.29.5/gui/simple-greeter/Makefile.am	2010-01-14 22:04:02.799610706 -0600
@@ -186,6 +186,7 @@ test_language_chooser_SOURCES = 	\
 
 test_language_chooser_LDADD =	\
 	$(GTK_LIBS)		\
+	$(GCONF_LIBS)		\
 	$(top_builddir)/common/libgdmcommon.la	\
 	$(COMMON_LIBS) \
 	$(NULL)
@@ -210,6 +211,7 @@ test_layout_chooser_SOURCES = 	\
 
 test_layout_chooser_LDADD =		\
 	$(GTK_LIBS)			\
+	$(GCONF_LIBS)			\
 	$(top_builddir)/common/libgdmcommon.la	\
 	$(LIBXKLAVIER_LIBS)		\
 	$(NULL)
--- gdm-2.29.5/gui/simple-greeter/gdm-greeter-login-window.c-orig	2010-01-14 22:06:47.906795771 -0600
+++ gdm-2.29.5/gui/simple-greeter/gdm-greeter-login-window.c	2010-01-14 21:58:48.489920744 -0600
@@ -80,6 +80,8 @@
 #define KEY_BANNER_MESSAGE_TEXT     KEY_GREETER_DIR "/banner_message_text"
 #define KEY_BANNER_MESSAGE_TEXT_NOCHOOSER     KEY_GREETER_DIR "/banner_message_text_nochooser"
 #define KEY_LOGO                    KEY_GREETER_DIR "/logo_icon_name"
+#define KEY_DISABLE_USER_LIST       "/apps/gdm/simple-greeter/disable_user_list"
+
 #define GDM_GREETER_LOGIN_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_GREETER_LOGIN_WINDOW, GdmGreeterLoginWindowPrivate))
 
 enum {
@@ -109,6 +111,9 @@ struct GdmGreeterLoginWindowPrivate
 
         guint            dialog_mode;
 
+        gboolean         user_list_disabled;
+        guint            num_info_query;
+
         gboolean         timed_login_enabled;
         guint            timed_login_delay;
         char            *timed_login_username;
@@ -460,7 +465,16 @@ switch_mode (GdmGreeterLoginWindow *logi
                 default_name = NULL;
                 break;
         case MODE_AUTHENTICATION:
-                show_widget (login_window, "cancel-button", TRUE);
+                /*
+                 * If user list is disabled, do not show the Cancel button the
+                 * first time the PAM entry is shown, since it does not do
+                 * anything.
+                 */
+                if (login_window->priv->user_list_disabled) {
+                        show_widget (login_window, "cancel-button", FALSE);
+                } else {
+                        show_widget (login_window, "cancel-button", TRUE);
+                }
                 show_widget (login_window, "disconnect-button", FALSE);
                 default_name = "log-in-button";
                 break;
@@ -522,6 +536,8 @@ reset_dialog (GdmGreeterLoginWindow *log
         set_busy (login_window);
         set_sensitive (login_window, FALSE);
 
+        login_window->priv->num_info_query = 0;
+
         if (login_window->priv->timed_login_enabled) {
                 gdm_chooser_widget_set_item_timer (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser),
                                                    GDM_USER_CHOOSER_USER_AUTO, 0);
@@ -573,6 +589,16 @@ do_cancel (GdmGreeterLoginWindow *login_
         g_signal_emit (login_window, signals[CANCELLED], 0);
 }
 
+static gboolean
+gdm_no_user_list (GdmGreeterLoginWindow *login_window)
+{
+        g_signal_emit (G_OBJECT (login_window), signals[USER_SELECTED],
+                       0, GDM_USER_CHOOSER_USER_OTHER);
+        g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0);
+        switch_mode (login_window, MODE_AUTHENTICATION);
+        return FALSE;
+}
+
 gboolean
 gdm_greeter_login_window_ready (GdmGreeterLoginWindow *login_window)
 {
@@ -580,6 +606,11 @@ gdm_greeter_login_window_ready (GdmGreet
 
         reset_dialog (login_window);
 
+        /* If no user list, then go ahead and start PAM conversation */
+        if (login_window->priv->user_list_disabled) {
+                g_idle_add ((GSourceFunc)gdm_no_user_list, login_window);
+        }
+
         set_sensitive (GDM_GREETER_LOGIN_WINDOW (login_window), TRUE);
         set_ready (GDM_GREETER_LOGIN_WINDOW (login_window));
         set_focus (GDM_GREETER_LOGIN_WINDOW (login_window));
@@ -758,6 +789,17 @@ gdm_greeter_login_window_info_query (Gdm
         GtkWidget  *entry;
         GtkWidget  *label;
 
+        /*
+         * If user list is disabled, do not show the Cancel button the first
+         * time the PAM entry is shown, since it does not do anything.  Start
+         * showing on the second item (when num_info_query is 1).
+         */
+        if (login_window->priv->user_list_disabled == TRUE &&
+            login_window->priv->num_info_query == 1) {
+                show_widget (login_window, "cancel-button", TRUE);
+        }
+        login_window->priv->num_info_query++;
+
         g_return_val_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window), FALSE);
 
         g_debug ("GdmGreeterLoginWindow: info query: %s", text);
@@ -789,6 +831,17 @@ gdm_greeter_login_window_secret_info_que
 
         g_return_val_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window), FALSE);
 
+        /*
+         * If user list is disabled, do not show the Cancel button the first
+         * time the PAM entry is shown, since it does not do anything.  Start
+         * showing on the second item (when num_info_query is 1).
+         */
+        if (login_window->priv->user_list_disabled == TRUE &&
+            login_window->priv->num_info_query == 1) {
+                show_widget (login_window, "cancel-button", TRUE);
+        }
+        login_window->priv->num_info_query++;
+
         entry = GTK_WIDGET (gtk_builder_get_object (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->builder, "auth-prompt-entry"));
         delete_entry_text (entry);
         gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
@@ -1482,12 +1535,24 @@ on_window_state_event (GtkWidget        
 static void
 gdm_greeter_login_window_init (GdmGreeterLoginWindow *login_window)
 {
+        GConfClient    *client;
+        GError         *error;
+
         gdm_profile_start (NULL);
 
         login_window->priv = GDM_GREETER_LOGIN_WINDOW_GET_PRIVATE (login_window);
 
         login_window->priv->timed_login_enabled = FALSE;
 
+        client = gconf_client_get_default ();
+        error = NULL;
+        login_window->priv->user_list_disabled = gconf_client_get_bool (client,
+                KEY_DISABLE_USER_LIST, &error);
+        if (error != NULL) {
+                g_debug ("GdmUserChooserWidget: unable to get disable-user-list configuration: %s", error->message);
+                g_error_free (error);
+        }
+
         login_window->priv->dialog_mode = MODE_SELECTION;
 
         gtk_window_set_title (GTK_WINDOW (login_window), _("Login Window"));
--- gdm-2.29.5/gui/simple-greeter/gdm-chooser-widget.c-orig	2010-01-14 21:58:24.253781227 -0600
+++ gdm-2.29.5/gui/simple-greeter/gdm-chooser-widget.c	2010-01-14 22:00:41.195981689 -0600
@@ -36,6 +36,8 @@
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
 
+#include <gconf/gconf-client.h>
+
 #include "gdm-chooser-widget.h"
 #include "gdm-scrollable-widget.h"
 #include "gdm-cell-renderer-timer.h"
@@ -43,6 +45,8 @@
 
 #define GDM_CHOOSER_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_CHOOSER_WIDGET, GdmChooserWidgetPrivate))
 
+#define KEY_DISABLE_USER_LIST "/apps/gdm/simple-greeter/disable_user_list"
+
 #ifndef GDM_CHOOSER_WIDGET_DEFAULT_ICON_SIZE
 #define GDM_CHOOSER_WIDGET_DEFAULT_ICON_SIZE 64
 #endif
@@ -804,11 +808,25 @@ static void
 on_grow_animation_complete (GdmScrollableWidget *scrollable_widget,
                             GdmChooserWidget    *widget)
 {
+        GConfClient *client;
+        GError      *error;
+        gboolean     result;
+
         g_assert (widget->priv->state == GDM_CHOOSER_WIDGET_STATE_GROWING);
         widget->priv->state = GDM_CHOOSER_WIDGET_STATE_GROWN;
         gtk_tree_view_set_enable_search (GTK_TREE_VIEW (widget->priv->items_view), TRUE);
 
-        _grab_focus (GTK_WIDGET (widget));
+        client = gconf_client_get_default ();
+        error = NULL;
+        result = gconf_client_get_bool (client, KEY_DISABLE_USER_LIST, &error);
+        if (error != NULL) {
+                g_debug ("GdmUserChooserWidget: unable to get disable-user-list configuration: %s", error->message);
+                g_error_free (error);
+        }
+
+        if (! result) {
+                _grab_focus (GTK_WIDGET (widget));
+        }
 }
 
 static int
