← Back to team overview

ubuntu-multiseat team mailing list archive

[Merge] lp:~ubuntu-multiseat/lightdm/option-start-local-sessions into lp:lightdm

 

Laércio de Sousa has proposed merging lp:~ubuntu-multiseat/lightdm/option-start-local-sessions into lp:lightdm.

Requested reviews:
  LightDM Development Team (lightdm-team)
Related bugs:
  Bug #1356332 in Light Display Manager: "New approach for nested-X-server multiseat support"
  https://bugs.launchpad.net/lightdm/+bug/1356332

For more details, see:
https://code.launchpad.net/~ubuntu-multiseat/lightdm/option-start-local-sessions/+merge/230976

Add a new seat option "start-local-sessions".

Setting this property explicitly to false will make seat start a bare X server only (no greeter, no user sessions), as it already does if option "xdmcp-manager" is set to a non-empty value.

This option can be useful in single-card multiseat setups, where one needs a bare X server spanning all monitors connected to a single multi-head graphics card, on top of which LightDM starts a nested X server for each seat.

In order to keep compatibility with current behaviour, setting "xdmcp-manager" option to a non-empty value will force "start-local-sessions" option to false.
-- 
https://code.launchpad.net/~ubuntu-multiseat/lightdm/option-start-local-sessions/+merge/230976
Your team Ubuntu Multiseat is subscribed to branch lp:~ubuntu-multiseat/lightdm/option-start-local-sessions.
=== modified file 'data/lightdm.conf'
--- data/lightdm.conf	2014-07-31 04:59:55 +0000
+++ data/lightdm.conf	2014-08-15 13:43:09 +0000
@@ -45,9 +45,10 @@
 # xserver-share = True if the X server is shared for both greeter and session
 # xserver-hostname = Hostname of X server (only for type=xremote)
 # xserver-display-number = Display number of X server (only for type=xremote)
-# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true)
+# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true and start-local-sessions=false)
 # xdmcp-port = XDMCP UDP/IP port to communicate on
 # xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf)
+# start-local-sessions = True if seat should start local sessions
 # unity-compositor-command = Unity compositor command to run (can also contain arguments e.g. unity-system-compositor -special-option)
 # unity-compositor-timeout = Number of seconds to wait for compositor to start
 # greeter-session = Session to load for greeter
@@ -90,6 +91,7 @@
 #xdmcp-manager=
 #xdmcp-port=177
 #xdmcp-key=
+#start-local-sessions=true
 #unity-compositor-command=unity-system-compositor
 #unity-compositor-timeout=60
 #greeter-session=example-gtk-gnome

=== modified file 'src/lightdm.c'
--- src/lightdm.c	2014-07-31 04:59:55 +0000
+++ src/lightdm.c	2014-08-15 13:43:09 +0000
@@ -227,6 +227,8 @@
         if (seat_name)
             config_section = g_strdup_printf ("Seat:%s", seat_name);
         set_seat_properties (next_seat, config_section);
+        if (seat_get_string_property (next_seat, "xdmcp-manager") != NULL)
+            seat_set_property (next_seat, "start-local-sessions", "false");
         g_free (config_section);
 
         // We set this manually on default seat.  Let's port it over if needed.
@@ -336,6 +338,8 @@
             set_seat_properties (seat, NULL);
             while (g_variant_iter_loop (property_iter, "(&s&s)", &name, &value))
                 seat_set_property (seat, name, value);
+            if (seat_get_string_property (seat, "xdmcp-manager") != NULL)
+                seat_set_property (seat, "start-local-sessions", "false");
         }
         g_variant_iter_free (property_iter);
 
@@ -1147,6 +1151,8 @@
         config_set_boolean (config_get_instance (), "SeatDefaults", "xserver-share", TRUE);
     if (!config_has_key (config_get_instance (), "SeatDefaults", "unity-compositor-command"))
         config_set_string (config_get_instance (), "SeatDefaults", "unity-compositor-command", "unity-system-compositor");
+    if (!config_has_key (config_get_instance (), "SeatDefaults", "start-local-sessions"))
+        config_set_boolean (config_get_instance (), "SeatDefaults", "start-local-sessions", TRUE);
     if (!config_has_key (config_get_instance (), "SeatDefaults", "start-session"))
         config_set_boolean (config_get_instance (), "SeatDefaults", "start-session", TRUE);
     if (!config_has_key (config_get_instance (), "SeatDefaults", "allow-user-switching"))
@@ -1264,6 +1270,8 @@
             seat_set_property (seat, "seat-name", seatname);
 
             set_seat_properties (seat, config_section);
+            if (seat_get_string_property (seat, "xdmcp-manager") != NULL)
+                seat_set_property (seat, "start-local-sessions", "false");
             display_manager_add_seat (display_manager, seat);
             g_object_unref (seat);
             n_seats++;
@@ -1293,6 +1301,8 @@
         if (seat)
         {
             set_seat_properties (seat, NULL);
+            if (seat_get_string_property (seat, "xdmcp-manager") != NULL)
+                seat_set_property (seat, "start-local-sessions", "false");
             seat_set_property (seat, "exit-on-failure", "true");
             if (!display_manager_add_seat (display_manager, seat))
                 return EXIT_FAILURE;

=== modified file 'src/seat-unity.c'
--- src/seat-unity.c	2014-07-31 04:59:55 +0000
+++ src/seat-unity.c	2014-08-15 13:43:09 +0000
@@ -42,7 +42,7 @@
 static gboolean
 seat_unity_get_start_local_sessions (Seat *seat)
 {
-    return !seat_get_string_property (seat, "xdmcp-manager");
+    return seat_get_boolean_property (seat, "start-local-sessions");
 }
 
 static void

=== modified file 'src/seat-xlocal.c'
--- src/seat-xlocal.c	2014-07-31 04:59:55 +0000
+++ src/seat-xlocal.c	2014-08-15 13:43:09 +0000
@@ -23,7 +23,7 @@
 static gboolean
 seat_xlocal_get_start_local_sessions (Seat *seat)
 {
-    return !seat_get_string_property (seat, "xdmcp-manager");
+    return seat_get_boolean_property (seat, "start-local-sessions");
 }
 
 static void

=== modified file 'src/seat.c'
--- src/seat.c	2014-07-31 05:11:06 +0000
+++ src/seat.c	2014-08-15 13:43:09 +0000
@@ -1606,7 +1606,7 @@
 static gboolean
 seat_real_get_start_local_sessions (Seat *seat)
 {
-    return TRUE;
+    return seat_get_boolean_property (seat, "start-local-sessions");
 }
 
 static void


Follow ups