--- gdm-2.25.2/gui/simple-greeter/gdm-simple-greeter.schemas.in.orig	2009-01-12 12:26:49.000000000 -0500
+++ gdm-2.25.2/gui/simple-greeter/gdm-simple-greeter.schemas.in	2009-01-12 12:43:28.000000000 -0500
@@ -68,6 +68,28 @@
       </locale>
     </schema>
     <schema>
+      <key>/schemas/apps/gdm/simple-greeter/list_logged_in_only</key>
+      <applyto>/apps/gdm/simple-greeter/list_logged_in_only</applyto>
+      <owner>gdm-simple-greeter</owner>
+      <type>bool</type>
+      <default>FALSE</default>
+      <locale name="C">
+        <short>Show only logged-in users in the login window</short>
+        <long>Set to TRUE to show only logged-in users (not all users) in the login window. Applicable only when disable_user_list=FALSE.</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/apps/gdm/simple-greeter/manual_entry_banner_text</key>
+      <applyto>/apps/gdm/simple-greeter/manual_entry_banner_text</applyto>
+      <owner>gdm-simple-greeter</owner>
+      <type>string</type>
+      <default></default>
+      <locale name="C">
+        <short>Alternative banner text for when the chooser list is empty.</short>
+        <long>If non-empty, replaces banner_message_text when the chooser list is empty and manual username entry is being used instead.</long>
+      </locale>
+    </schema>
+    <schema>
       <key>/schemas/apps/gdm/simple-greeter/recent-languages</key>
       <applyto>/apps/gdm/simple-greeter/recent-languages</applyto>
       <owner>gdm-simple-greeter</owner>
--- gdm-2.25.2/gui/simple-greeter/gdm-greeter-login-window.c.orig	2009-01-12 12:26:49.000000000 -0500
+++ gdm-2.25.2/gui/simple-greeter/gdm-greeter-login-window.c	2009-01-12 13:14:30.000000000 -0500
@@ -92,6 +92,7 @@
 #define KEY_GREETER_DIR             "/apps/gdm/simple-greeter"
 #define KEY_BANNER_MESSAGE_ENABLED  KEY_GREETER_DIR "/banner_message_enable"
 #define KEY_BANNER_MESSAGE_TEXT     KEY_GREETER_DIR "/banner_message_text"
+#define KEY_BANNER_MESSAGE_MANUAL   KEY_GREETER_DIR "/manual_entry_banner_text"
 #define KEY_LOGO                    KEY_GREETER_DIR "/logo_icon_name"
 #define KEY_DISABLE_RESTART_BUTTONS KEY_GREETER_DIR "/disable_restart_buttons"
 #define GDM_GREETER_LOGIN_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_GREETER_LOGIN_WINDOW, GdmGreeterLoginWindowPrivate))
@@ -559,6 +560,8 @@
  * in the state appropriate for MODE_SELECTION (so this routine
  * should only be called when mode is MODE_SELECTION or about to
  * be reset to MODE_SELECTION). */
+static void
+update_banner_message (GdmGreeterLoginWindow *login_window);
 
 static void
 set_user_selection_type (GdmGreeterLoginWindow *login_window,
@@ -568,6 +571,7 @@
 	gtk_label_set_text ( GTK_LABEL(login_window->priv->manual_user_chosen_value), "no user selected");
 	gtk_widget_hide_all(login_window->priv->manual_user_chosen);
 	login_window->priv->user_selection_type = selection_type;
+	update_banner_message(login_window);
 	if (selection_type == SELECTION_TYPE_CHOOSER) 
 	{
 	    gtk_widget_show(login_window->priv->user_chooser);
@@ -1839,8 +1843,15 @@
                 gtk_widget_hide (login_window->priv->auth_banner_label);
         } else {
                 char *message;
+		char *manual_message;
                 error = NULL;
                 message = gconf_client_get_string (login_window->priv->client, KEY_BANNER_MESSAGE_TEXT, &error);
+		if (login_window->priv->user_selection_type == SELECTION_TYPE_MANUAL) {
+			manual_message = gconf_client_get_string (login_window->priv->client, KEY_BANNER_MESSAGE_MANUAL, &error);
+			if (manual_message != NULL && *manual_message) {
+				message = manual_message;
+			}
+		}
                 if (message != NULL) {
                         char *markup;
                         markup = g_markup_printf_escaped ("<small><i>%s</i></small>", message);
--- gdm-2.25.2/gui/simple-greeter/gdm-user-chooser-widget.c.orig	2009-01-12 12:26:49.000000000 -0500
+++ gdm-2.25.2/gui/simple-greeter/gdm-user-chooser-widget.c	2009-01-12 13:22:48.000000000 -0500
@@ -41,6 +41,7 @@
 
 
 #define KEY_DISABLE_USER_LIST "/apps/gdm/simple-greeter/disable_user_list"
+#define KEY_LIST_LOGGED_IN_ONLY "/apps/gdm/simple-greeter/list_logged_in_only"
 
 enum {
         USER_NO_DISPLAY              = 1 << 0,
@@ -66,6 +67,7 @@
         guint           show_user_guest : 1;
         guint           show_user_auto : 1;
         guint           show_normal_users : 1;
+        guint           show_logged_in_only : 1;
 
         guint           load_idle_id;
 	guint		number_of_users;
@@ -169,11 +171,17 @@
 static void
 add_user_other (GdmUserChooserWidget *widget)
 {
+	char *other_name = "Other...";
+	char *other_desc = "Choose a different account";
+	if (widget->priv->show_logged_in_only) {
+		other_name = "Log in as a different user...";
+		other_desc = "Create a new session using a different account";
+	}
         gdm_chooser_widget_add_item (GDM_CHOOSER_WIDGET (widget),
                                      GDM_USER_CHOOSER_USER_OTHER,
                                      NULL,
-                                     _("Other..."),
-                                     _("Choose a different account"),
+                                     _(other_name),
+                                     _(other_desc),
                                      0,
                                      FALSE,
                                      TRUE);
@@ -358,23 +366,35 @@
         }
 }
 
-static gboolean
-is_user_list_disabled (GdmUserChooserWidget *widget)
+enum {
+	USER_LIST_ENABLED_FULL = 0,
+	USER_LIST_LOGGED_IN_ONLY,
+	USER_LIST_DISABLED
+};
+
+static guint
+get_user_list_enable_status (GdmUserChooserWidget *widget)
 {
         GConfClient *client;
         GError      *error;
-        gboolean     result;
+        gboolean     disabled;
+	gboolean     logged_in_only;
 
         client = gconf_client_get_default ();
         error = NULL;
-        result = gconf_client_get_bool (client, KEY_DISABLE_USER_LIST, &error);
+        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);
         }
+        logged_in_only = gconf_client_get_bool (client, KEY_LIST_LOGGED_IN_ONLY, &error);
+        if (error != NULL) {
+                g_debug ("GdmUserChooserWidget: unable to get list-logged-in-only configuration: %s", error->message);
+                g_error_free (error);
+        }
         g_object_unref (client);
 
-        return result;
+        return disabled ? USER_LIST_DISABLED : (logged_in_only ? USER_LIST_LOGGED_IN_ONLY : USER_LIST_ENABLED_FULL );
 }
 
 static void
@@ -390,6 +410,11 @@
                 return;
         }
 
+        is_logged_in = gdm_user_get_num_sessions (user) > 0;
+	if (! is_logged_in && widget->priv->show_logged_in_only) {
+		return;
+	}
+
         size = get_icon_height_for_widget (GTK_WIDGET(widget));
         pixbuf = gdm_user_render_icon (user, size);
         if (pixbuf == NULL && widget->priv->stock_person_pixbuf != NULL) {
@@ -399,8 +424,6 @@
         tooltip = g_strdup_printf (_("Log in as %s"),
                                    gdm_user_get_user_name (user));
 
-        is_logged_in = gdm_user_get_num_sessions (user) > 0;
-
         g_debug ("GdmUserChooserWidget: User added name:%s logged-in:%d pixbuf:%p",
                  gdm_user_get_user_name (user),
                  is_logged_in,
@@ -557,13 +580,16 @@
                                      GObjectConstructParam *construct_properties)
 {
         GdmUserChooserWidget      *widget;
+	guint			  user_list_enable_status;
 
         widget = GDM_USER_CHOOSER_WIDGET (G_OBJECT_CLASS (gdm_user_chooser_widget_parent_class)->constructor (type,
                                                                                                               n_construct_properties,
                                                                                                               construct_properties));
 
 	widget->priv->number_of_users = 0;
-        widget->priv->show_normal_users = !is_user_list_disabled (widget);
+	user_list_enable_status = get_user_list_enable_status(widget);
+        widget->priv->show_normal_users = (user_list_enable_status != USER_LIST_DISABLED);
+	widget->priv->show_logged_in_only = (user_list_enable_status == USER_LIST_LOGGED_IN_ONLY);
 
         widget->priv->load_idle_id = g_idle_add ((GSourceFunc)load_users, widget);
 
--- gdm-2.25.2/gui/simple-greeter/gdm-user-chooser-widget.c.loggedin1	2009-01-12 13:22:48.000000000 -0500
+++ gdm-2.25.2/gui/simple-greeter/gdm-user-chooser-widget.c	2009-01-12 15:07:23.000000000 -0500
@@ -485,11 +485,37 @@
         const char *user_name;
         gboolean    is_logged_in;
 
+        /* wait for all users to be loaded */
+        if (! widget->priv->loaded) {
+                return;   
+        }
         g_debug ("GdmUserChooserWidget: User logged in changed: %s", gdm_user_get_user_name (user));
 
         user_name = gdm_user_get_user_name (user);
         is_logged_in = gdm_user_get_num_sessions (user) > 0;
 
+        if (widget->priv->show_logged_in_only) {
+		GdkPixbuf *image;
+		char *name;
+		char *comment;
+		gulong priority;
+		gboolean was_in_use;
+		gboolean is_separate;
+		if (gdm_chooser_widget_lookup_item(GDM_CHOOSER_WIDGET(widget), user_name,
+			&image, &name, &comment, &priority, &was_in_use, &is_separate)) {
+/* Item was already present. If user is no longer logged in, remove the item.
+ * Otherwise, fall through to set the item_in_use flag if needed. */
+			if (! is_logged_in) {
+			       	gdm_chooser_widget_remove_item (GDM_CHOOSER_WIDGET (widget), user_name);
+			       	adjust_number_of_users(widget, -1);
+				return;
+			}
+		} else {
+/* Item was not present. Add it if user is now logged in. */
+			if (is_logged_in) add_user(widget, user);
+			return;
+		}
+        }
         gdm_chooser_widget_set_item_in_use (GDM_CHOOSER_WIDGET (widget),
                                             user_name,
                                             is_logged_in);
