[systemd-devel] logind: multiseat without framebuffer graphic cards
Lennart Poettering
lennart at poettering.net
Sat Nov 24 13:46:03 PST 2012
On Sat, 24.11.12 23:12, Олег Самарин (osamarin68 at gmail.com) wrote:
> В Пт., 23/11/2012 в 18:22 +0100, Lennart Poettering пишет:
> > > OK. So we need two changes:
> > >
> > > (1). Introduce a new udev tag that means "master device" for the seat.
> > > Support it with logind.c. Add an udev rule that sets this tag for all
> > > framebuffer device
> >
> > Yes, and please name this tag "seat-master".
> >
>
> The patch is ready (see attached file). I've tested it on my computer
> with two nvidia cards and closed source driver ant on a virtualbox with
> one framebuffer device. Seems everything works. But I coudn't test it
> with two real framebuffer devices.
Please rebase to current git! We merge new stuff like this only into the git
version.
> > > (2). multi-seat-x should not trigger an error if there is no framebufer
> > > device exist on the seat. It is a temporary stuff until X can get device
> > > from -seat, so it may look for a specially named config file or just
> > > start X without any addition parameters (or with -sharevts only)
> >
> > I'd much prefer if this was done in X instead. i.e. via matching the
> > -seat parameter when parsing configuration files.
>
> The problem is not the -seat parameter, but the following:
>
> 1. The path /usr/lib/systemd/systemd-multi-seat-x path is hardcode in
> GDM for all seats except seat0
As mentioned, for F19 we want to get rid of that. systemd-multi-seat-x
was only intended to be a temporary work-around until X learned to use
"-seat" for enumerating video devices. In F18 the code of s-m-s-x is
already much shorter.
> 1. Describe the tag "seat-master" at
> http://www.freedesktop.org/wiki/Software/systemd/multiseat
> I do not have a write access on this page, but I can post changed pieces
> of text here.
It's a Wiki, you can simply register there and edit freely. That said,
please don't make any changes before the respective code is not merged
into systemd yet.
>
> 2. Make 'loginctl seat-status' to display which device is a
> seat-master
This would be useful, i.e. show a little asterisk or so next to the
master devices of a seat.
> 3. Make 'loginctl attach' capable of adding a device as a seat-master.
> For example
I don't think this is really necessary or even a good idea. A master
device should just mean that some device is sufficient for a seat to
exist. But that's property of a device/driver, not so much configuration
of the user, hence I think there is no point in adding high-level
commands for this.
> 4. Now the case is not resolved if two or more seat-master devices exist
> in the same seat and one of them becomes unplugged. Seems according the
> login.c, manager_process_seat_device function will destroy the seat, but
> this behavior does not look like a correct. The same issue exists with
> framebuffer devices.
Hmm, so, the rule should definitely be that as long as at least one
master device is around logind should keep the seat around. Newer X
subscribes to udev, and can properly deal with graphics cards appearing
and going away, and will merge them appropriately.
> 5. An issue is not related to framebuffer but to user access privileges:
> users cann't access /dev/snd/seq device in a multi-seat environment.
> This device is used by all MIDI applications, so they do not work (the
> workaround is to include users to the audio group, but it causes all
> sound card are accessible regardless their seats).
This sounds as if it should be tagged with uaccess, so that it is
managed by dynamic ACLs as sessoins become active and inactive.
Kay, what's the story behind /dev/snd/seq and ACLs?
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list