Skip to content

Commit c3285af

Browse files
committed
Don't start non-graphical seats
1 parent c8e29f6 commit c3285af

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

src/lightdm.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,10 @@ add_login1_seat (Login1Seat *login1_seat)
944944
Seat *seat = NULL;
945945
gboolean is_seat0, started = FALSE;
946946

947+
/* We only create graphical seats */
948+
if (!login1_seat_get_can_graphical (login1_seat))
949+
return TRUE;
950+
947951
g_debug ("New seat added from logind: %s", seat_name);
948952
is_seat0 = strcmp (seat_name, "seat0") == 0;
949953

tests/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ TESTS = \
181181
test-open-file-descriptors \
182182
test-xdmcp-server-open-file-descriptors \
183183
test-multi-seat \
184+
test-multi-seat-non-graphical \
184185
test-mir-autologin \
185186
test-mir-greeter \
186187
test-mir-session \
@@ -444,6 +445,7 @@ EXTRA_DIST = \
444445
scripts/mir-session-compositor-crash.conf \
445446
scripts/mir-session-crash.conf \
446447
scripts/multi-seat.conf \
448+
scripts/multi-seat-non-graphical.conf \
447449
scripts/no-accounts-service.conf \
448450
scripts/no-config.conf \
449451
scripts/no-console-kit.conf \
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#
2+
# Check non graphical seats are ignored
3+
#
4+
5+
#?*START-DAEMON
6+
#?RUNNER DAEMON-START
7+
8+
# seat0 starts
9+
#?XSERVER-0 START VT=7 SEAT=seat0
10+
#?*XSERVER-0 INDICATE-READY
11+
#?XSERVER-0 INDICATE-READY
12+
#?XSERVER-0 ACCEPT-CONNECT
13+
#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter
14+
#?LOGIN1 ACTIVATE-SESSION SESSION=c0
15+
#?XSERVER-0 ACCEPT-CONNECT
16+
#?GREETER-X-0 CONNECT-XSERVER
17+
#?GREETER-X-0 CONNECT-TO-DAEMON
18+
#?GREETER-X-0 CONNECTED-TO-DAEMON
19+
20+
# Add seat1
21+
#?*ADD-SEAT ID=seat1 CAN-GRAPHICAL=FALSE
22+
23+
# Check no seat is added
24+
#?*WAIT
25+
26+
# Cleanup
27+
#?*STOP-DAEMON
28+
#?GREETER-X-0 TERMINATE SIGNAL=15
29+
#?XSERVER-0 TERMINATE SIGNAL=15
30+
#?RUNNER DAEMON-EXIT STATUS=0

tests/test-multi-seat-non-graphical

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
./src/dbus-env ./src/test-runner multi-seat-non-graphical test-gobject-greeter

0 commit comments

Comments
 (0)