Code review comment for lp:~andrzejtp2010/lightdm/lightdm-trunk-xephyr-multiseat

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

Hello Robert,

On 10/01/12 03:57, Robert Ancell wrote:
> Review: Needs Information

Thank you for your review, please see my comments inline.

<snip>

> The first change of removing the lock file is the wrong thing to do. The lock file is owned by the X server process and should only be removed by the X server in question. What is the reason for this change?

After X server crashes the lock file remains there; after restarting the
lightdm the DISPLAY number is picked by it but if the lock file is still
there the number cannot be recycled. E.g. if there are 3 servers (:0,
:1, :2) and :1 crashes, then after restarting lightdm the :1 cannot be
reused and :0, :2, :3 are started instead.

>
> The second change of using a common VT doesn't seem required. As far as I can tell Xephyr ignores the VT option (as it's not required) so I don't see a need for this.

The change is intended for multiseat local configurations. By multiseat
configuration I mean sharing one computer by e.g. 2 people
simultaneously: there are 2 keyboards, 2 mice and 2 monitors, and 2
independent X sessions. In fact using 2 monitors is only for
convenience; technically speaking sharing one monitor to display 2 X
sessions side-by-side is just as good (a nice picture with as many as 4
gdms on one monitor is here:
http://4.bp.blogspot.com/_5K-T2ymLHSo/TU60HMooXEI/AAAAAAAAAAc/SDH27atTA2o/s1600/IMGP5282.JPG).
The idea is that there is one X server covering all available monitors,
and there are a number of Xephyrs running inside it, one per each user.
The Xephyrs are configured so that they use the evdev protocol and read
keyboards/mice directly from /dev/input/eventXX files. And in each
Xephyr a greeter is run (e.g. ligthdm-gtk-greeter). Once we have a
greeter, we can start X session and we are all set.

Here is my lightdm.conf:

[LightDM]
greeter-user=root
user-authority-in-system-dir=false
common-vt=true

[SeatDefaults]
xserver-allow-tcp=false
greeter-hide-users=true
user-session=lightdm-xsession
session-wrapper=/etc/X11/Xsession

[Seat:0]
xserver-command=X -br -dpms -s 0 -novtswitch
greeter-session=xinerama

[Seat:1]
xserver-command=/etc/multiseat/scripts/Xephyr-seat-1
greeter-session=multiseat-greeter-1

[Seat:2]
xserver-command=/etc/multiseat/scripts/Xephyr-seat-2
greeter-session=multiseat-greeter-2

With this setup lightdm dutifully starts the 3 servers. And without the
patch in question the Seat:0 will run on vt7, Seat:1 will run on vt8 and
Seat:2 will run on vt9; it is possible to switch between them with
Ctrl-Alt-F7..9, but only one is visible at a time. And this is exactly
the opposite of what I want! Because I want all of them to be visible at
the same time.

Perhaps you can prove me wrong, which would otherwise be good as the
less features the better if things still can be done, but I haven't
manage to run multiseat without the patch adding common-vt. However,
with the patch applied, multiseat runs like a charm!

Just for your information, I've been using gdm for many (roughly 8)
years for this purpose and it just worked out of the box; and it was THE
display manager of choice for virtually all multiseat users all over the
world. It used to have a "handled=false" option, which allowed just
running an X server without running a greeter in it and it is exactly
what I want for Seat:0 (right now this is achieved with a fake greeter
which does just a periodic sleep). And it worked well. However, they
phased out gdm from Debian in favor of gdm3, which is a monster with a
gazillion of config files no one understands. So I turned to lightdm
which promises to be of a light code base. And I happily run multiseat
with a fresh Debian, but would like to see all the required components
in the mainline.

Regards,

Andrzej

« Back to merge proposal