← Back to team overview

ubuntu-multiseat team mailing list archive

Re: Trusty gdm/lightdm multiseat inconsistencies

 

2014-03-19 13:00 GMT-03:00 Daniel J Blueman <daniel@xxxxxxxxx>:

> With GDM from the Ubuntu multiseat repo, we see 'sharevts' added to
> the second X server:
> /usr/bin/X :0 -background none -verbose -auth
> /var/run/gdm/auth-for-gdm-eqajeQ/database -seat seat0 -nolisten tcp
> vt7
> /usr/bin/X :1 -background none -verbose -auth
> /var/run/gdm/auth-for-gdm-v2WUO6/database -seat seat1 -nolisten tcp
> -config /run/systemd/multi-session-x/seat1 -sharevts
>

GDM by default launches systemd's multi-seat-x wrapper if it's available.
This wrapper execs a X server with "-config
/run/systemd/multi-session-x/seatXXXX -sharevts" for seatXXXX. The config
file /run/systemd/multi-session-x/seatXXXX basically sets flag
"DontVTSwitch" and "GrabDevice" for input devices with evdev driver.

With lightdm from the trusty repos, we see 'novtswitch' added to the
> first X server:
> /usr/bin/X -core :0 -seat seat0 -auth /var/run/lightdm/root/:0
> -nolisten tcp vt7 -novtswitch
> /usr/bin/X -core :1 -seat seat1 -auth /var/run/lightdm/root/:1 -nolisten
> tcp


The -novtswitch option for X server is irrelevant for multiseat. It's
different from option "DontVTSwitch" in xorg.conf. Let me explain it with
an example: If I login at console (e.g. tty1) and run "startx" or "X :0
vt7", it will switch to tty7 and start the X server. When the X server
terminates, it will switch back to tty1, unless it was started with
-novtswitch option (in which case it should stay on tty7).

Anyway, the xorg-server package from Multiseat PPA includes a patch (that
will be released by upstream in version 1.16) that prevents non-seat0 X
servers from touching VTs. In this case, options like "vtXX" or "-sharevts"
have no effect at all  for non-seat0 X servers, and multi-seat-x wrapper
itself is no longer needed.

BTW, your DisplayLink adapters are from Plugable? systemd ships some udev
rules to set property ID_AUTOSEAT for such devices. When this property is
set, a new seat is created automatically when the device is plugged. The
new seat id is generated automatically based on the value of property
ID_FOR_SEAT (e.g. seat-usb-pci-0000_00_1d_0-usb-0_1_2).

If ID_AUTOSEAT is not set for your DisplayLink device, you can write a
custom udev rule to do this (get idVendor and idProduct values from command
udevadm):

SUBSYSTEM=="usb", ATTR{idVendor}=="XXXX", ATTR{idProduct}=="XXXX",
TAG+="master-of-seat", ENV{ID_AUTOSEAT}="1"

Regards,

CANTATE DOMINO CANTICUM NOVUM
QUIA MIRABILIA FECIT

Laércio

References