Index: gui/simple-greeter/gdm-user-chooser-widget.c
===================================================================
--- gui/simple-greeter/gdm-user-chooser-widget.c.orig
+++ gui/simple-greeter/gdm-user-chooser-widget.c
@@ -67,6 +67,8 @@ struct GdmUserChooserWidgetPrivate
         guint           show_user_auto : 1;
         guint           show_normal_users : 1;
 
+        guint           real_show_user_other : 1;
+
         guint           load_idle_id;
 };
 
@@ -83,6 +85,9 @@ static void     gdm_user_chooser_widget_
 
 G_DEFINE_TYPE (GdmUserChooserWidget, gdm_user_chooser_widget, GDM_TYPE_CHOOSER_WIDGET)
 
+static void     add_user_other    (GdmUserChooserWidget *widget);
+static void     remove_user_other (GdmUserChooserWidget *widget);
+
 static int
 get_font_height_for_widget (GtkWidget *widget)
 {
@@ -123,8 +128,31 @@ get_icon_height_for_widget (GtkWidget *w
 }
 
 static void
+update_other_user_visibility (GdmUserChooserWidget *widget)
+{
+        if (!widget->priv->show_user_other) {
+                if (widget->priv->real_show_user_other) {
+                        remove_user_other (widget);
+                }
+
+                return;
+        }
+
+        if (gdm_chooser_widget_get_number_of_items (GDM_CHOOSER_WIDGET (widget)) == 1) {
+                /* we hide the Other user if it's the last one, and we show it
+                 * if there's another user */
+                if (widget->priv->real_show_user_other) {
+                        remove_user_other (widget);
+                } else {
+                        add_user_other (widget);
+                }
+        }
+}
+
+static void
 add_user_other (GdmUserChooserWidget *widget)
 {
+        widget->priv->real_show_user_other = TRUE;
         gdm_chooser_widget_add_item (GDM_CHOOSER_WIDGET (widget),
                                      GDM_USER_CHOOSER_USER_OTHER,
                                      NULL,
@@ -146,6 +174,7 @@ add_user_guest (GdmUserChooserWidget *wi
                                      0,
                                      FALSE,
                                      TRUE);
+        update_other_user_visibility (widget);
 }
 
 static void
@@ -159,11 +188,13 @@ add_user_auto (GdmUserChooserWidget *wid
                                      0,
                                      FALSE,
                                      TRUE);
+        update_other_user_visibility (widget);
 }
 
 static void
 remove_user_other (GdmUserChooserWidget *widget)
 {
+        widget->priv->real_show_user_other = FALSE;
         gdm_chooser_widget_remove_item (GDM_CHOOSER_WIDGET (widget),
                                         GDM_USER_CHOOSER_USER_OTHER);
 }
@@ -173,6 +204,7 @@ remove_user_guest (GdmUserChooserWidget
 {
         gdm_chooser_widget_remove_item (GDM_CHOOSER_WIDGET (widget),
                                         GDM_USER_CHOOSER_USER_GUEST);
+        update_other_user_visibility (widget);
 }
 
 static void
@@ -180,6 +212,7 @@ remove_user_auto (GdmUserChooserWidget *
 {
         gdm_chooser_widget_remove_item (GDM_CHOOSER_WIDGET (widget),
                                         GDM_USER_CHOOSER_USER_AUTO);
+        update_other_user_visibility (widget);
 }
 
 void
@@ -190,11 +223,7 @@ gdm_user_chooser_widget_set_show_user_ot
 
         if (widget->priv->show_user_other != show_user) {
                 widget->priv->show_user_other = show_user;
-                if (show_user) {
-                        add_user_other (widget);
-                } else {
-                        remove_user_other (widget);
-                }
+                update_other_user_visibility (widget);
         }
 }
 
@@ -369,6 +398,8 @@ add_user (GdmUserChooserWidget *widget,
         if (pixbuf != NULL) {
                 g_object_unref (pixbuf);
         }
+
+        update_other_user_visibility (widget);
 }
 
 static void
@@ -400,6 +431,8 @@ on_user_removed (GdmUserManager       *m
 
         gdm_chooser_widget_remove_item (GDM_CHOOSER_WIDGET (widget),
                                         user_name);
+
+        update_other_user_visibility (widget);
 }
 
 static void
@@ -444,8 +477,6 @@ on_users_loaded (GdmUserManager       *m
 {
         GSList *users;
 
-        widget->priv->loaded = TRUE;
-
         g_debug ("GdmUserChooserWidget: Users loaded");
 
         users = gdm_user_manager_list_users (manager);
@@ -454,7 +485,7 @@ on_users_loaded (GdmUserManager       *m
                 users = g_slist_delete_link (users, users);
         }
 
-        gtk_widget_grab_focus (GTK_WIDGET (widget));
+        widget->priv->loaded = TRUE;
 
         gdm_chooser_widget_loaded (GDM_CHOOSER_WIDGET (widget));
 }
@@ -505,6 +536,7 @@ gdm_user_chooser_widget_constructor (GTy
                                                                                                               n_construct_properties,
                                                                                                               construct_properties));
 
+        widget->priv->real_show_user_other = FALSE;
         widget->priv->show_normal_users = !is_user_list_disabled (widget);
 
         widget->priv->load_idle_id = g_idle_add ((GSourceFunc)load_users, widget);
Index: gui/simple-greeter/test-greeter-login-window.c
===================================================================
--- gui/simple-greeter/test-greeter-login-window.c.orig
+++ gui/simple-greeter/test-greeter-login-window.c
@@ -53,7 +53,7 @@ main (int argc, char *argv[])
         }
 
         login_window = gdm_greeter_login_window_new (TRUE);
-        gtk_widget_show (login_window);
+        gdm_greeter_login_window_show (GDM_GREETER_LOGIN_WINDOW (login_window));
 
         gtk_main ();
 
Index: gui/simple-greeter/gdm-greeter-login-window.c
===================================================================
--- gui/simple-greeter/gdm-greeter-login-window.c.orig
+++ gui/simple-greeter/gdm-greeter-login-window.c
@@ -115,6 +115,7 @@ struct GdmGreeterLoginWindowPrivate
         GtkWidget       *auth_banner_label;
         guint            display_is_local : 1;
         guint            is_interactive : 1;
+        guint            user_chooser_loaded : 1;
         GConfClient     *client;
 
         gboolean         caps_lock_on;
@@ -133,6 +134,8 @@ struct GdmGreeterLoginWindowPrivate
 
         guint            login_button_handler_id;
         guint            start_session_handler_id;
+
+        guint            show_timeout_id;
 };
 
 enum {
@@ -205,6 +208,10 @@ set_busy (GdmGreeterLoginWindow *login_w
 {
         GdkCursor *cursor;
 
+        if (!GTK_WIDGET_REALIZED (login_window)) {
+                return;
+        }
+
         cursor = gdk_cursor_new (GDK_WATCH);
         gdk_window_set_cursor (GTK_WIDGET (login_window)->window, cursor);
         gdk_cursor_unref (cursor);
@@ -213,6 +220,10 @@ set_busy (GdmGreeterLoginWindow *login_w
 static void
 set_ready (GdmGreeterLoginWindow *login_window)
 {
+        if (!GTK_WIDGET_REALIZED (login_window)) {
+                return;
+        }
+
         gdk_window_set_cursor (GTK_WIDGET (login_window)->window, NULL);
 }
 
@@ -236,6 +247,10 @@ set_focus (GdmGreeterLoginWindow *login_
 {
         GtkWidget *entry;
 
+        if (!GTK_WIDGET_REALIZED (login_window)) {
+                return;
+        }
+
         entry = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-entry");
 
         gdk_window_focus (GTK_WIDGET (login_window)->window, GDK_CURRENT_TIME);
@@ -566,9 +581,13 @@ switch_mode (GdmGreeterLoginWindow *logi
         GtkWidget  *box;
         gboolean    show_restart_buttons;
         gboolean    show_suspend_button;
+        gboolean    only_other_user;
+        gboolean    show_buttons;
 
-        show_restart_buttons = get_show_restart_buttons (login_window);
-        show_suspend_button = can_suspend (login_window);
+        only_other_user = (gdm_chooser_widget_get_number_of_items (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser)) == 0);
+        show_buttons = (number == MODE_SELECTION) || only_other_user;
+        show_restart_buttons = show_buttons && get_show_restart_buttons (login_window);
+        show_suspend_button = show_buttons && can_suspend (login_window);
 
         /* we want to run this even if we're supposed to
            be in the mode already so that we reset everything
@@ -577,7 +596,14 @@ switch_mode (GdmGreeterLoginWindow *logi
 
         default_name = NULL;
 
-        remove_sensitize_power_buttons_timeout (login_window);
+        show_widget (login_window, "shutdown-button",
+                     login_window->priv->display_is_local && show_restart_buttons);
+        show_widget (login_window, "restart-button",
+                     login_window->priv->display_is_local && show_restart_buttons);
+        show_widget (login_window, "suspend-button",
+                     login_window->priv->display_is_local && show_restart_buttons && show_suspend_button);
+        show_widget (login_window, "disconnect-button",
+                     !login_window->priv->display_is_local && show_buttons);
 
         switch (number) {
         case MODE_SELECTION:
@@ -585,15 +611,6 @@ switch_mode (GdmGreeterLoginWindow *logi
 
                 show_widget (login_window, "cancel-button", FALSE);
 
-                show_widget (login_window, "shutdown-button",
-                             login_window->priv->display_is_local && show_restart_buttons);
-                show_widget (login_window, "restart-button",
-                             login_window->priv->display_is_local && show_restart_buttons);
-                show_widget (login_window, "suspend-button",
-                             login_window->priv->display_is_local && show_restart_buttons && show_suspend_button);
-                show_widget (login_window, "disconnect-button",
-                             ! login_window->priv->display_is_local);
-
                 show_widget (login_window, "auth-input-box", FALSE);
 
                 add_sensitize_power_buttons_timeout (login_window);
@@ -606,10 +623,12 @@ switch_mode (GdmGreeterLoginWindow *logi
                 break;
         case MODE_AUTHENTICATION:
                 show_widget (login_window, "cancel-button", TRUE);
-                show_widget (login_window, "shutdown-button", FALSE);
-                show_widget (login_window, "restart-button", FALSE);
-                show_widget (login_window, "suspend-button", FALSE);
-                show_widget (login_window, "disconnect-button", FALSE);
+
+                sensitize_widget (login_window, "shutdown-button", TRUE);
+                sensitize_widget (login_window, "restart-button", TRUE);
+                sensitize_widget (login_window, "suspend-button", TRUE);
+                sensitize_widget (login_window, "disconnect-button", TRUE);
+
                 default_name = "log-in-button";
                 break;
         default:
@@ -703,10 +722,40 @@ delete_entry_text (GtkWidget *entry)
 }
 
 static void
+select_user (GdmGreeterLoginWindow *login_window,
+             const char            *user_name)
+{
+        g_signal_emit (G_OBJECT (login_window), signals[USER_SELECTED],
+                       0, user_name);
+
+        if (strcmp (user_name, GDM_USER_CHOOSER_USER_OTHER) == 0) {
+                g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0);
+        } else if (strcmp (user_name, GDM_USER_CHOOSER_USER_GUEST) == 0) {
+                /* FIXME: handle guest account stuff */
+        } else if (strcmp (user_name, GDM_USER_CHOOSER_USER_AUTO) == 0) {
+                g_signal_emit (login_window, signals[BEGIN_AUTO_LOGIN], 0,
+                               login_window->priv->timed_login_username);
+
+                login_window->priv->timed_login_enabled = TRUE;
+                restart_timed_login_timeout (login_window);
+
+                /* just wait for the user to select language and stuff */
+                set_log_in_button_mode (login_window, LOGIN_BUTTON_TIMED_LOGIN);
+                set_message (login_window, _("Select language and click Log In"));
+        } else {
+                g_signal_emit (login_window, signals[BEGIN_VERIFICATION_FOR_USER], 0, user_name);
+        }
+
+        switch_mode (login_window, MODE_AUTHENTICATION);
+}
+
+
+static void
 reset_dialog (GdmGreeterLoginWindow *login_window)
 {
         GtkWidget  *entry;
         GtkWidget  *label;
+        gboolean    use_selection;
 
         g_debug ("GdmGreeterLoginWindow: Resetting dialog");
         set_busy (login_window);
@@ -741,12 +790,21 @@ reset_dialog (GdmGreeterLoginWindow *log
         label = glade_xml_get_widget (GDM_GREETER_LOGIN_WINDOW (login_window)->priv->xml, "auth-prompt-label");
         gtk_label_set_text (GTK_LABEL (label), "");
 
-        switch_mode (login_window, MODE_SELECTION);
+        use_selection = !login_window->priv->user_chooser_loaded || (gdm_chooser_widget_get_number_of_items (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser)) >= 1);
+
+        if (use_selection) {
+                switch_mode (login_window, MODE_SELECTION);
+        } else {
+                select_user (login_window, GDM_USER_CHOOSER_USER_OTHER);
+        }
 
         set_sensitive (login_window, TRUE);
         set_ready (login_window);
         set_focus (GDM_GREETER_LOGIN_WINDOW (login_window));
-        gdm_chooser_widget_propagate_pending_key_events (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser));
+
+        if (use_selection) {
+                gdm_chooser_widget_propagate_pending_key_events (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser));
+        }
 }
 
 static void
@@ -1357,11 +1415,40 @@ shutdown_button_clicked (GtkButton
         do_system_stop (login_window);
 }
 
+static gboolean
+show_timer (GdmGreeterLoginWindow *login_window)
+{
+        if (login_window->priv->show_timeout_id != 0) {
+                g_source_remove (login_window->priv->show_timeout_id);
+                login_window->priv->show_timeout_id = 0;
+        }
+
+        gtk_widget_show (GTK_WIDGET (login_window));
+
+        set_focus (login_window);
+
+        return FALSE;
+}
+
 static void
 on_users_loaded (GdmUserChooserWidget  *user_chooser,
                  GdmGreeterLoginWindow *login_window)
 {
-        gdm_chooser_widget_activate_if_one_item (GDM_CHOOSER_WIDGET (login_window->priv->user_chooser));
+        int number_users;
+
+        g_debug ("GdmGreeterLoginWindow: users loaded");
+
+        login_window->priv->user_chooser_loaded = TRUE;
+
+        number_users = gdm_chooser_widget_get_number_of_items (GDM_CHOOSER_WIDGET (user_chooser));
+
+        if (number_users == 1) {
+                gdm_chooser_widget_activate_if_one_item (GDM_CHOOSER_WIDGET (user_chooser));
+        } else if (number_users == 0) {
+                select_user (login_window, GDM_USER_CHOOSER_USER_OTHER);
+        }
+
+        show_timer (login_window);
 }
 
 static void
@@ -1377,28 +1464,7 @@ on_user_chosen (GdmUserChooserWidget  *u
                 return;
         }
 
-        g_signal_emit (G_OBJECT (login_window), signals[USER_SELECTED],
-                       0, user_name);
-
-        if (strcmp (user_name, GDM_USER_CHOOSER_USER_OTHER) == 0) {
-                g_signal_emit (login_window, signals[BEGIN_VERIFICATION], 0);
-        } else if (strcmp (user_name, GDM_USER_CHOOSER_USER_GUEST) == 0) {
-                /* FIXME: handle guest account stuff */
-        } else if (strcmp (user_name, GDM_USER_CHOOSER_USER_AUTO) == 0) {
-                g_signal_emit (login_window, signals[BEGIN_AUTO_LOGIN], 0,
-                               login_window->priv->timed_login_username);
-
-                login_window->priv->timed_login_enabled = TRUE;
-                restart_timed_login_timeout (login_window);
-
-                /* just wait for the user to select language and stuff */
-                set_log_in_button_mode (login_window, LOGIN_BUTTON_TIMED_LOGIN);
-                set_message (login_window, _("Select language and click Log In"));
-        } else {
-                g_signal_emit (login_window, signals[BEGIN_VERIFICATION_FOR_USER], 0, user_name);
-        }
-
-        switch_mode (login_window, MODE_AUTHENTICATION);
+        select_user (login_window, user_name);
 
         g_free (user_name);
 }
@@ -1938,10 +2004,13 @@ gdm_greeter_login_window_init (GdmGreete
 
         login_window->priv = GDM_GREETER_LOGIN_WINDOW_GET_PRIVATE (login_window);
 
+        login_window->priv->user_chooser_loaded = FALSE;
         login_window->priv->timed_login_enabled = FALSE;
 
         login_window->priv->dialog_mode = MODE_SELECTION;
 
+        login_window->priv->show_timeout_id = 0;
+
         gtk_window_set_title (GTK_WINDOW (login_window), _("Login Window"));
         /*gtk_window_set_opacity (GTK_WINDOW (login_window), 0.85);*/
         gtk_window_set_position (GTK_WINDOW (login_window), GTK_WIN_POS_CENTER_ALWAYS);
@@ -2005,3 +2074,17 @@ gdm_greeter_login_window_new (gboolean i
 
         return GTK_WIDGET (object);
 }
+
+void
+gdm_greeter_login_window_show (GdmGreeterLoginWindow *login_window)
+{
+        g_return_if_fail (GDM_IS_GREETER_LOGIN_WINDOW (login_window));
+
+        if (login_window->priv->show_timeout_id != 0) {
+                return;
+        }
+
+        login_window->priv->show_timeout_id = g_timeout_add_seconds (1,
+                                                                     (GSourceFunc) show_timer,
+                                                                     login_window);
+}
Index: gui/simple-greeter/gdm-greeter-login-window.h
===================================================================
--- gui/simple-greeter/gdm-greeter-login-window.h.orig
+++ gui/simple-greeter/gdm-greeter-login-window.h
@@ -64,6 +64,7 @@ typedef struct
 GType               gdm_greeter_login_window_get_type           (void);
 GtkWidget *         gdm_greeter_login_window_new                (gboolean display_is_local);
 
+void                gdm_greeter_login_window_show               (GdmGreeterLoginWindow *login_window);
 
 gboolean            gdm_greeter_login_window_reset              (GdmGreeterLoginWindow *login_window);
 gboolean            gdm_greeter_login_window_ready              (GdmGreeterLoginWindow *login_window);
Index: gui/simple-greeter/gdm-greeter-session.c
===================================================================
--- gui/simple-greeter/gdm-greeter-session.c.orig
+++ gui/simple-greeter/gdm-greeter-session.c
@@ -449,7 +449,7 @@ toggle_login_window (GdmGreeterSession *
                                   "start-session",
                                   G_CALLBACK (on_start_session),
                                   session);
-                gtk_widget_show (session->priv->login_window);
+                gdm_greeter_login_window_show (GDM_GREETER_LOGIN_WINDOW (session->priv->login_window));
         } else {
                 gtk_widget_destroy (session->priv->login_window);
                 session->priv->login_window = NULL;
Index: gui/simple-greeter/gdm-chooser-widget.c
===================================================================
--- gui/simple-greeter/gdm-chooser-widget.c.orig
+++ gui/simple-greeter/gdm-chooser-widget.c
@@ -593,6 +593,16 @@ update_separator_visibility (GdmChooserW
 }
 
 static void
+update_chooser_visibility (GdmChooserWidget *widget)
+{
+        if (gdm_chooser_widget_get_number_of_items (widget) > 0) {
+                gtk_widget_show (widget->priv->scrollable_widget);
+        } else {
+                gtk_widget_hide (widget->priv->scrollable_widget);
+        }
+}
+
+static void
 set_inactive_items_visible (GdmChooserWidget *widget,
                             gboolean          should_show)
 {
@@ -1771,7 +1781,6 @@ gdm_chooser_widget_init (GdmChooserWidge
         add_frame (widget);
 
         widget->priv->scrollable_widget = gdm_scrollable_widget_new ();
-        gtk_widget_show (widget->priv->scrollable_widget);
         gtk_container_add (GTK_CONTAINER (widget->priv->frame_alignment),
                            widget->priv->scrollable_widget);
 
@@ -2055,6 +2064,8 @@ gdm_chooser_widget_add_item (GdmChooserW
                                            -1);
 
         move_cursor_to_top (widget);
+
+        update_chooser_visibility (widget);
 }
 
 void
@@ -2103,6 +2114,8 @@ gdm_chooser_widget_remove_item (GdmChoos
         gtk_list_store_remove (widget->priv->list_store, &iter);
 
         move_cursor_to_top (widget);
+
+        update_chooser_visibility (widget);
 }
 
 void
