[systemd-devel] Someone working on gui for multiseat?

Lennart Poettering lennart at poettering.net
Mon Feb 11 12:16:08 PST 2013


On Mon, 11.02.13 09:45, Stef Bon (stefbon at gmail.com) wrote:

> 
> 2013/2/8 Lennart Poettering <lennart at poettering.net>:
> > On Fri, 08.02.13 12:27, Stef Bon (stefbon at gmail.com) wrote:
> >
> >>
> >> > No, udev contains the information which devices together make up a
> >> > seat. Hence, it is also udev where it is stored whether something is
> >> > used in "docking station" style or in "new seat" style.
> >>
> >> Can you please tell me where?
> >
> > Bus calls such as AttachDevice() (and hence "loginctl attach-device"
> > too, which is just a wrapper around that bus call) drop in udev rules
> > files for this in /etc/udev/rules.d.
> >
> Look this is getting us nowhere.
> 
> You do not seem to understand my point.
> 
> How does this rule look like? I'm asking because I cannot immagine
> one.

That's more or less an implementation detail:

        TAG=="seat", ENV{ID_FOR_SEAT}=="foobar", ENV{ID_SEAT}="waldo"

This rule hence applies to all devices with the seat tag on where
ID_FOR_SEAT matches some string, and then assigns that to some other
seat.

ID_FOR_SEAT is documented here:

http://www.freedesktop.org/wiki/Software/systemd/multiseat

> Earlier in this thread I've described the scenario of the first
> plugable device being a docking station, and every next plugable
> device an extra seat.

Are you suggesting that as the default? I am pretty sure we don't want
that. Devices should be handled the same, regardless in which order they
are plugged in, especially since that's practically undefined during
coldplug.

> This logic can't be done with "simple" rules like in udev. Plugable
> devices do not have unique id like partitions on block devices have,
> so the rules can only be very generic. Every plugable device is a seat

The rules current use ID_FOR_SEAT for that which is generated from the
fixed components of the device path. That means you can replace broken
mice, and as long as you plug the replacement mouse into the old USB
port it will still be assigned to the same seat.

> or a docking station. There can't be something like I've described
> above, the first a docking station, and every next an extra seat.
> Isn't it?

There shouldn't be something like that. Breaks during coldplug, see
above.

> In my opinion the setting of the tags "seat" in udev is not the best
> place. They should be grouped in udev, and the group of devices is
> made an extra seat or docking station by GDM or any other service like
> logind, that I do not know.

I don't follow. 

Here are the rules:

a) we need to treat all devices of the same type the same, a logic
   depending on the order of discovery is not possible.

b) As the Plugable devices are primarily marketed for multi-seat
   purposes, that's what we default to, but using the AttachDevice() bus
   call this can be changed, into the port replicator "mode" instead.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list