]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Don't start non-graphical seats
authorRobert Ancell <robert.ancell@canonical.com>
Wed, 27 Aug 2014 23:12:39 +0000 (11:12 +1200)
committerRobert Ancell <robert.ancell@canonical.com>
Wed, 27 Aug 2014 23:12:39 +0000 (11:12 +1200)
src/lightdm.c
tests/Makefile.am
tests/scripts/multi-seat-non-graphical.conf [new file with mode: 0644]
tests/test-multi-seat-non-graphical [new file with mode: 0755]

index 876036ff2a996c6937a377f22c114719116b6c2c..2209acf06f030bf7df0560ca41dcc110e64a59b1 100644 (file)
@@ -944,6 +944,10 @@ add_login1_seat (Login1Seat *login1_seat)
     Seat *seat = NULL;
     gboolean is_seat0, started = FALSE;
 
+    /* We only create graphical seats */
+    if (!login1_seat_get_can_graphical (login1_seat))
+        return TRUE;
+
     g_debug ("New seat added from logind: %s", seat_name);
     is_seat0 = strcmp (seat_name, "seat0") == 0;
 
index d499b69584058daad9f9c2bbb99b3776255a9a82..4dbb9a4cc6d254ff9268d554346138b84ba74e9e 100644 (file)
@@ -181,6 +181,7 @@ TESTS = \
        test-open-file-descriptors \
        test-xdmcp-server-open-file-descriptors \
        test-multi-seat \
+       test-multi-seat-non-graphical \
        test-mir-autologin \
        test-mir-greeter \
        test-mir-session \
@@ -444,6 +445,7 @@ EXTRA_DIST = \
        scripts/mir-session-compositor-crash.conf \
        scripts/mir-session-crash.conf \
        scripts/multi-seat.conf \
+       scripts/multi-seat-non-graphical.conf \
        scripts/no-accounts-service.conf \
        scripts/no-config.conf \
        scripts/no-console-kit.conf \
diff --git a/tests/scripts/multi-seat-non-graphical.conf b/tests/scripts/multi-seat-non-graphical.conf
new file mode 100644 (file)
index 0000000..b07533d
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# Check non graphical seats are ignored
+#
+
+#?*START-DAEMON
+#?RUNNER DAEMON-START
+
+# seat0 starts
+#?XSERVER-0 START VT=7 SEAT=seat0
+#?*XSERVER-0 INDICATE-READY
+#?XSERVER-0 INDICATE-READY
+#?XSERVER-0 ACCEPT-CONNECT
+#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
+#?LOGIN1 ACTIVATE-SESSION SESSION=c0
+#?XSERVER-0 ACCEPT-CONNECT
+#?GREETER-X-0 CONNECT-XSERVER
+#?GREETER-X-0 CONNECT-TO-DAEMON
+#?GREETER-X-0 CONNECTED-TO-DAEMON
+
+# Add seat1
+#?*ADD-SEAT ID=seat1 CAN-GRAPHICAL=FALSE
+
+# Check no seat is added
+#?*WAIT
+
+# Cleanup
+#?*STOP-DAEMON
+#?GREETER-X-0 TERMINATE SIGNAL=15
+#?XSERVER-0 TERMINATE SIGNAL=15
+#?RUNNER DAEMON-EXIT STATUS=0
diff --git a/tests/test-multi-seat-non-graphical b/tests/test-multi-seat-non-graphical
new file mode 100755 (executable)
index 0000000..dac4700
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+./src/dbus-env ./src/test-runner multi-seat-non-graphical test-gobject-greeter