sobota, 5 października 2013

Long time, no see

lightdm-1.6.2-1 is there. And so is Xephyr 1.12.4-6.2+b2.
The latter works with the usual procedure. The former does change the procedure a bit. The patch referring to removing stale files does not apply at all. I just don't use it any more... and as far as I know there has been some activity in the lightdm project regarding removing any stale files at runtime. So now only the patch adding the "common-vt" option is required.
Below is what I applied:

diff --git a/src/lightdm.c b/src/lightdm.c
index 7f67ea7..840aee1 100644
--- a/src/lightdm.c
+++ b/src/lightdm.c
@@ -1056,6 +1056,8 @@ main (int argc, char **argv)
         config_set_boolean (config_get_instance (), "LightDM", "start-default-seat", TRUE);
     if (!config_has_key (config_get_instance (), "LightDM", "minimum-vt"))
         config_set_integer (config_get_instance (), "LightDM", "minimum-vt", 7);
+    if (!config_has_key (config_get_instance (), "LightDM", "common-vt"))
+        config_set_boolean (config_get_instance (), "LightDM", "common-vt", FALSE);
     if (!config_has_key (config_get_instance (), "LightDM", "guest-account-script"))
         config_set_string (config_get_instance (), "LightDM", "guest-account-script", "guest-account");
     if (!config_has_key (config_get_instance (), "LightDM", "greeter-user"))
diff --git a/src/vt.c b/src/vt.c
index 62839d9..810e73e 100644
--- a/src/vt.c
+++ b/src/vt.c
@@ -117,15 +117,23 @@ vt_get_min (void)
 gint
 vt_get_unused (void)
 {
+    static gint common_number = -1;
+
+    gboolean common_vt;
     gint number;

     if (getuid () != 0)
         return -1;

+    common_vt = config_get_boolean (config_get_instance (), "LightDM", "common-vt");
+    if (common_vt && common_number > 0)
+    return common_number;
+
     number = vt_get_min ();
     while (vt_is_used (number))
         number++;
 
+    common_number = number;
     return number;
 }



And it works, as of October 5th, 2013.