Merge lp:~muktupavels/lightdm/improve-multiseat-support into lp:lightdm

Proposed by Alberts Muktupāvels
Status: Merged
Approved by: Robert Ancell
Approved revision: 1877
Merged at revision: 1887
Proposed branch: lp:~muktupavels/lightdm/improve-multiseat-support
Merge into: lp:lightdm
Diff against target: 43 lines (+6/-3)
2 files modified
src/seat-xlocal.c (+4/-1)
tests/scripts/xdg-seat.conf (+2/-2)
To merge this branch: bzr merge lp:~muktupavels/lightdm/improve-multiseat-support
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Robert Ancell Approve
Review via email: mp+202951@code.launchpad.net

Commit message

Improve multiseat support

Description of the change

With current lightdm version I have two following problems in multiseat setup:
1) First seat user logs in, all is ok. When second seat user logs in, first seat vt gets switched. User needs use Ctrl+Alt+F7 to get back to desktop.
2) Second seat user can not access audio devices. In sound settings only 'dummy output' is listed.

This commit will fix both problems.

To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote :

This fails when you run 'make check'. Specifically the xdg-seat test (cd tests ; ./test-xdg-seat). The fix is quite trivial but you should make it to show that you know the tests and think if this is the correct behaviour.

The removal of the VT check in seat_xlocal_get_active_session () doesn't really make sense. In a multi-seat case you should probably check seat_get_string_property (seat, "xdg-seat") instead and do something different than checking if any session is on this VT.

You should replace:
(xdg_seat && strcmp (xdg_seat, "seat0") == 0)
with
g_strcmp0 (xdg_seat, "seat0") == 0
as this is more readable.

review: Needs Fixing
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

> This fails when you run 'make check'. Specifically the xdg-seat test (cd tests
> ; ./test-xdg-seat). The fix is quite trivial but you should make it to show
> that you know the tests and think if this is the correct behaviour.

Is it good now? Now all tests completes successfully. From xdg-seat.conf removed VT check. Only main seat - seat0 should know about VT (from docomentation - http://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/). So if seat is not seat0 than vt should not be set.

> The removal of the VT check in seat_xlocal_get_active_session () doesn't
> really make sense. In a multi-seat case you should probably check
> seat_get_string_property (seat, "xdg-seat") instead and do something different
> than checking if any session is on this VT.

Added back VT check.

> You should replace:
> (xdg_seat && strcmp (xdg_seat, "seat0") == 0)
> with
> g_strcmp0 (xdg_seat, "seat0") == 0
> as this is more readable.

Replaced.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Looks good, thanks!

review: Approve
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

> Looks good, thanks!

Is there any reason why you did not merge this branch?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

I was waiting for the CI system to confirm it, but it didn't happen as I thought.

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/seat-xlocal.c'
2--- src/seat-xlocal.c 2013-12-11 03:28:54 +0000
3+++ src/seat-xlocal.c 2014-02-05 15:30:28 +0000
4@@ -61,6 +61,7 @@
5 get_vt (Seat *seat, DisplayServer *display_server)
6 {
7 gint vt = -1;
8+ const gchar *xdg_seat = seat_get_string_property (seat, "xdg-seat");
9
10 /* If Plymouth is running, stop it */
11 if (plymouth_get_is_active () && plymouth_has_active_vt ())
12@@ -78,7 +79,9 @@
13 }
14 if (plymouth_get_is_active ())
15 plymouth_quit (FALSE);
16- if (vt < 0)
17+ if (!xdg_seat)
18+ xdg_seat = "seat0";
19+ if (vt < 0 && g_strcmp0 (xdg_seat, "seat0") == 0)
20 vt = vt_get_unused ();
21
22 return vt;
23
24=== modified file 'tests/scripts/xdg-seat.conf'
25--- tests/scripts/xdg-seat.conf 2013-10-03 21:28:05 +0000
26+++ tests/scripts/xdg-seat.conf 2014-02-05 15:30:28 +0000
27@@ -10,7 +10,7 @@
28 #?RUNNER DAEMON-START
29
30 # X server starts
31-#?XSERVER-0 START VT=7 SEAT=seat1
32+#?XSERVER-0 START SEAT=seat1
33
34 # Daemon connects when X server is ready
35 #?*XSERVER-0 INDICATE-READY
36@@ -18,7 +18,7 @@
37 #?XSERVER-0 ACCEPT-CONNECT
38
39 # Session starts
40-#?SESSION-X-0 START XDG_SEAT=seat1 XDG_VTNR=7 DESKTOP_SESSION=default USER=have-password1
41+#?SESSION-X-0 START XDG_SEAT=seat1 DESKTOP_SESSION=default USER=have-password1
42 #?XSERVER-0 ACCEPT-CONNECT
43 #?SESSION-X-0 CONNECT-XSERVER
44

Subscribers

People subscribed via source and target branches