diff -aur gdm-2.18.3.orig/config/gdm.conf.in gdm-2.18.3/config/gdm.conf.in
--- gdm-2.18.3.orig/config/gdm.conf.in	2007-07-03 02:08:02.000000000 -0600
+++ gdm-2.18.3/config/gdm.conf.in	2007-07-08 23:47:13.000000000 -0600
@@ -51,12 +51,14 @@
 # as user as set with AutomaticLogin key.
 AutomaticLoginEnable=false
 AutomaticLogin=
+AutomaticLoginFirstOnly=true
 
 # Timed login, useful for kiosks.  Log in a certain user after a certain amount
 # of time.
 TimedLoginEnable=false
 TimedLogin=
 TimedLoginDelay=30
+TimedLoginFirstOnly=true
 
 # The GDM configuration program that is run from the login screen, you should
 # probably leave this alone.
diff -aur gdm-2.18.3.orig/daemon/gdm.c gdm-2.18.3/daemon/gdm.c
--- gdm-2.18.3.orig/daemon/gdm.c	2007-07-03 02:08:01.000000000 -0600
+++ gdm-2.18.3/daemon/gdm.c	2007-07-09 01:34:23.000000000 -0600
@@ -264,8 +264,9 @@
 			d->sleep_before_run = delay;
 
 			/* only the first static display has
-			 * timed login going on */
-			if (gdm_first_login)
+			 * timed login going on unless TimedLoginFirstOnly = false */
+			if (gdm_first_login ||
+			    ! gdm_get_value_bool(GDM_KEY_TIMED_LOGIN_FIRST_ONLY))
 				d->timed_login_ok = TRUE;
 
 			svr = gdm_server_resolve (d);
diff -aur gdm-2.18.3.orig/daemon/gdmconfig.c gdm-2.18.3/daemon/gdmconfig.c
--- gdm-2.18.3.orig/daemon/gdmconfig.c	2007-07-03 02:08:02.000000000 -0600
+++ gdm-2.18.3/daemon/gdmconfig.c	2007-07-08 23:47:13.000000000 -0600
@@ -156,6 +156,7 @@
 
 gboolean GdmAlwaysRestartServer;
 static gboolean GdmAutomaticLoginEnable;
+static gboolean GdmAutomaticLoginFirstOnly;
 static gboolean GdmConfigAvailable;
 static gboolean GdmSystemMenu;
 static gboolean GdmChooserButton;
@@ -179,6 +180,7 @@
 static gboolean GdmCheckDirOwner;
 static gboolean GdmSupportAutomount;
 static gboolean GdmTimedLoginEnable;
+static gboolean GdmTimedLoginFirstOnly;
 static gboolean GdmDynamicXservers;
 static gboolean GdmVTAllocation;
 static gboolean GdmDisallowTcp;
@@ -353,6 +355,8 @@
    gdm_config_add_hash (GDM_KEY_PASSWORD_REQUIRED, &GdmPasswordRequired, &bool_type);
    gdm_config_add_hash (GDM_KEY_AUTOMATIC_LOGIN_ENABLE,
       &GdmAutomaticLoginEnable, &bool_type);
+   gdm_config_add_hash (GDM_KEY_AUTOMATIC_LOGIN_FIRST_ONLY,
+      &GdmAutomaticLoginFirstOnly, &bool_type);
    gdm_config_add_hash (GDM_KEY_ALWAYS_RESTART_SERVER,
       &GdmAlwaysRestartServer, &bool_type);
    gdm_config_add_hash (GDM_KEY_ADD_GTK_MODULES, &GdmAddGtkModules, &bool_type);
@@ -371,6 +375,7 @@
       &GdmNeverPlaceCookiesOnNfs, &bool_type);
    gdm_config_add_hash (GDM_KEY_CONSOLE_NOTIFY, &GdmConsoleNotify, &bool_type);
    gdm_config_add_hash (GDM_KEY_TIMED_LOGIN_ENABLE, &GdmTimedLoginEnable, &bool_type);
+   gdm_config_add_hash (GDM_KEY_TIMED_LOGIN_FIRST_ONLY, &GdmTimedLoginFirstOnly, &bool_type);
    gdm_config_add_hash (GDM_KEY_CHECK_DIR_OWNER, &GdmCheckDirOwner, &bool_type);
    gdm_config_add_hash (GDM_KEY_SUPPORT_AUTOMOUNT, &GdmSupportAutomount, &bool_type);
    gdm_config_add_hash (GDM_KEY_XDMCP, &GdmXdmcp, &bool_type);
@@ -1326,6 +1331,8 @@
         notify_displays_int (GDM_NOTIFY_ALLOW_ROOT, *setting);
      else if (is_key (key, GDM_KEY_ALLOW_REMOTE_ROOT))
         notify_displays_int (GDM_NOTIFY_ALLOW_REMOTE_ROOT, *setting);
+     else if (is_key (key, GDM_KEY_AUTOMATIC_LOGIN_FIRST_ONLY))
+        notify_displays_int (GDM_NOTIFY_AUTOMATIC_LOGIN_FIRST_ONLY, *setting);
      else if (is_key (key, GDM_KEY_ALLOW_REMOTE_AUTOLOGIN))
         notify_displays_int (GDM_NOTIFY_ALLOW_REMOTE_AUTOLOGIN, *setting);
      else if (is_key (key, GDM_KEY_SYSTEM_MENU))
@@ -1340,6 +1347,8 @@
         notify_displays_int (GDM_NOTIFY_ADD_GTK_MODULES, *setting);
      else if (is_key (key, GDM_KEY_TIMED_LOGIN_ENABLE))
         notify_displays_int (GDM_NOTIFY_TIMED_LOGIN_ENABLE, *setting);
+     else if (is_key (key, GDM_KEY_TIMED_LOGIN_FIRST_ONLY))
+        notify_displays_int (GDM_NOTIFY_TIMED_LOGIN_FIRST_ONLY, *setting);
    }
 
    if (*setting)
diff -aur gdm-2.18.3.orig/daemon/gdm.h gdm-2.18.3/daemon/gdm.h
--- gdm-2.18.3.orig/daemon/gdm.h	2007-07-03 02:08:01.000000000 -0600
+++ gdm-2.18.3/daemon/gdm.h	2007-07-08 21:47:53.000000000 -0600
@@ -208,6 +208,7 @@
 #define GDM_KEY_CHOOSER "daemon/Chooser=" LIBEXECDIR "/gdmchooser"
 #define GDM_KEY_AUTOMATIC_LOGIN_ENABLE "daemon/AutomaticLoginEnable=false"
 #define GDM_KEY_AUTOMATIC_LOGIN "daemon/AutomaticLogin="
+#define GDM_KEY_AUTOMATIC_LOGIN_FIRST_ONLY "daemon/AutomaticLoginFirstOnly=true"
 /* The SDTLOGIN feature is Solaris specific, and causes the Xserver to be
  * run with user permissionsinstead of as root, which adds security but
  * disables the AlwaysRestartServer option as highlighted in the gdm
@@ -258,6 +259,7 @@
 #define GDM_KEY_TIMED_LOGIN_ENABLE "daemon/TimedLoginEnable=false"
 #define GDM_KEY_TIMED_LOGIN "daemon/TimedLogin="
 #define GDM_KEY_TIMED_LOGIN_DELAY "daemon/TimedLoginDelay=30"
+#define GDM_KEY_TIMED_LOGIN_FIRST_ONLY "daemon/TimedLoginFirstOnly=true"
 
 #define GDM_KEY_FLEXI_REAP_DELAY_MINUTES "daemon/FlexiReapDelayMinutes=5"
 
@@ -750,6 +752,7 @@
 #define GDM_NOTIFY_ALLOW_REMOTE_ROOT "AllowRemoteRoot" /* <true/false as int> */
 #define GDM_NOTIFY_ALLOW_ROOT "AllowRoot" /* <true/false as int> */
 #define GDM_NOTIFY_ALLOW_REMOTE_AUTOLOGIN "AllowRemoteAutoLogin" /* <true/false as int> */
+#define GDM_NOTIFY_AUTOMATIC_LOGIN_FIRST_ONLY "AutomaticLoginFirstOnly" /* <true/false as int> */
 #define GDM_NOTIFY_SYSTEM_MENU "SystemMenu" /* <true/false as int> */
 #define GDM_NOTIFY_CONFIG_AVAILABLE "ConfigAvailable" /* <true/false as int> */
 #define GDM_NOTIFY_CHOOSER_BUTTON "ChooserButton" /* <true/false as int> */
@@ -759,6 +762,7 @@
 #define GDM_NOTIFY_TIMED_LOGIN "TimedLogin" /* <login> */
 #define GDM_NOTIFY_TIMED_LOGIN_DELAY "TimedLoginDelay" /* <seconds> */
 #define GDM_NOTIFY_TIMED_LOGIN_ENABLE "TimedLoginEnable" /* <true/false as int> */
+#define GDM_NOTIFY_TIMED_LOGIN_FIRST_ONLY "TimedLoginFirstOnly" /* <true/false as int> */
 #define GDM_NOTIFY_DISALLOW_TCP "DisallowTCP" /* <true/false as int> */
 #define GDM_NOTIFY_SOUND_ON_LOGIN_FILE "SoundOnLoginFile" /* <sound file> */
 #define GDM_NOTIFY_SOUND_ON_LOGIN_SUCCESS_FILE "SoundOnLoginSuccessFile" /* <sound file> */
diff -aur gdm-2.18.3.orig/daemon/slave.c gdm-2.18.3/daemon/slave.c
--- gdm-2.18.3.orig/daemon/slave.c	2007-07-03 02:08:01.000000000 -0600
+++ gdm-2.18.3/daemon/slave.c	2007-07-09 01:38:18.000000000 -0600
@@ -1510,7 +1510,8 @@
 	    gdm_slave_chooser ();  /* Run the chooser */
 	    return;
     } else if (d->type == TYPE_STATIC &&
-	       gdm_first_login &&
+	       ( gdm_first_login ||
+		 ! gdm_get_value_bool(GDM_KEY_AUTOMATIC_LOGIN_FIRST_ONLY) ) &&
 	       ! ve_string_empty (ParsedAutomaticLogin) &&
 	       strcmp (ParsedAutomaticLogin, gdm_root_user ()) != 0) {
 	    gdm_first_login = FALSE;
@@ -5765,7 +5766,9 @@
 	           (strncmp (msg, GDM_NOTIFY_TIMED_LOGIN_DELAY " ",
 			     strlen (GDM_NOTIFY_TIMED_LOGIN_DELAY) + 1) == 0) ||
 	           (strncmp (msg, GDM_NOTIFY_TIMED_LOGIN_ENABLE " ",
-			     strlen (GDM_NOTIFY_TIMED_LOGIN_ENABLE) + 1) == 0)) {
+			     strlen (GDM_NOTIFY_TIMED_LOGIN_ENABLE) + 1) == 0)
+	           (strncmp (msg, GDM_NOTIFY_TIMED_LOGIN_FIRST_ONLY " ",
+			     strlen (GDM_NOTIFY_TIMED_LOGIN_FIRST_ONLY) + 1) == 0)) {
 		do_restart_greeter = TRUE;
 		/* FIXME: this is fairly nasty, we should handle this nicer   */
 		/* FIXME: can't handle flexi servers without going all cranky */
diff -aur gdm-2.18.3.orig/docs/C/gdm.xml gdm-2.18.3/docs/C/gdm.xml
--- gdm-2.18.3.orig/docs/C/gdm.xml	2007-07-03 03:03:58.000000000 -0600
+++ gdm-2.18.3/docs/C/gdm.xml	2007-07-08 23:57:08.000000000 -0600
@@ -1835,6 +1835,19 @@
           </varlistentry>
 
           <varlistentry>
+            <term>AutomaticLoginFirstOnly</term>
+            <listitem>
+              <synopsis>AutomaticLoginFirstOnly=true</synopsis>
+              <para>
+		If this is true (default), only allow AutomaticLogin on the
+		first display.  This is mainly useful if you are trying to do
+		something like 'AutomaticLogin=/usr/local/sbin/gdm_user.sh' and
+		want to have autologin work on multiple displays.
+	      </para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
             <term>BaseXsession</term>
             <listitem>
               <synopsis>BaseXsession=&lt;etc&gt;/gdm/Xsession</synopsis>
@@ -2397,6 +2410,19 @@
           </varlistentry>
           
           <varlistentry>
+            <term>TimedLoginFirstOnly</term>
+            <listitem>
+              <synopsis>TimedLoginFirstOnly=true</synopsis>
+              <para>
+		If this is true (default), only allow TimedLogin on the
+		first display.  This is mainly useful if you are trying to do
+		something like 'TimedLogin=/usr/local/sbin/gdm_user.sh' and
+		want to have autologin work on multiple displays.
+	      </para>
+            </listitem>
+          </varlistentry>
+
+          <varlistentry>
             <term>User</term>
             <listitem>
               <synopsis>User=gdm</synopsis>
