[gdm-list] Multiseat, auto login and timed login patch proposal



Hi !

As I've installed a multiseat computer at home and wanted my two seats to auto-login, I've made this little patch which allow ten seats in gdm.
Auto login and timed login works perfectly on my two seats now.

Hope you'll not find it too dirty :-)

Best regards,
Boris Lechner

diff -ruN daemon.orig/gdm.c daemon/gdm.c
--- daemon.orig/gdm.c	2009-03-19 05:59:27.000000000 +0100
+++ daemon/gdm.c	2009-05-18 22:06:22.000000000 +0200
@@ -134,7 +134,7 @@
 unsigned char *gdm_global_bcookie = NULL;
 char *gdm_system_locale = NULL;
 
-gboolean gdm_first_login = TRUE;
+gboolean gdm_first_login[10] = {TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE};
 
 static GdmLogoutAction safe_logout_action = GDM_LOGOUT_ACTION_NONE;
 
@@ -258,7 +258,7 @@
 
 			/* only the first static display has
 			 * timed login going on */
-			if (gdm_first_login)
+			if (gdm_first_login[d->dispnum])
 				d->timed_login_ok = TRUE;
 
 			svr = gdm_server_resolve (d);
@@ -271,7 +271,7 @@
 				if (svr != NULL &&
 				    svr->handled &&
 				    ! svr->chooser)
-					gdm_first_login = FALSE;
+					gdm_first_login[d->dispnum] = FALSE;
 			} else {
 				/* only the first static display where
 				   we actually log in gets
@@ -279,7 +279,7 @@
 				if (svr != NULL &&
 				    svr->handled &&
 				    ! svr->chooser)
-					gdm_first_login = FALSE;
+					gdm_first_login[d->dispnum] = FALSE;
 				break;
 			}
 		}
diff -ruN daemon.orig/slave.c daemon/slave.c
--- daemon.orig/slave.c	2009-03-19 05:59:27.000000000 +0100
+++ daemon/slave.c	2009-05-18 22:06:26.000000000 +0200
@@ -192,7 +192,7 @@
 static int slave_waitpid_w             = -1;
 static GSList *slave_waitpids          = NULL;
 
-extern gboolean gdm_first_login;
+extern gboolean gdm_first_login[];
 
 /* The slavepipe (like fifo) connection, this is the write end */
 extern int slave_fifo_pipe_fd;
@@ -1605,10 +1605,10 @@
 		gdm_slave_chooser ();  /* Run the chooser */
 		return;
 	} else if (d->type == TYPE_STATIC &&
-		   gdm_first_login &&
+		   gdm_first_login[d->dispnum] &&
 		   ! ve_string_empty (ParsedAutomaticLogin) &&
 		   strcmp (ParsedAutomaticLogin, gdm_root_user ()) != 0) {
-		gdm_first_login = FALSE;
+		gdm_first_login[d->dispnum] = FALSE;
 
 		d->logged_in = TRUE;
 		gdm_slave_send_num (GDM_SOP_LOGGED_IN, TRUE);
@@ -1635,8 +1635,8 @@
 		return;
 	}
 
-	if (gdm_first_login)
-		gdm_first_login = FALSE;
+	if (gdm_first_login[d->dispnum])
+		gdm_first_login[d->dispnum] = FALSE;
 
 	do {
 		check_notifies_now ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]