[PATCH] config: provide example configuration for multi-seat setups

Peter Hutterer peter.hutterer at who-t.net
Sun Jul 14 18:20:12 PDT 2013


On Fri, Jul 12, 2013 at 07:48:13AM -0700, Dan Nicholson wrote:
> On Jul 11, 2013 7:37 PM, "Peter Hutterer" <peter.hutterer at who-t.net> wrote:
> >
> > Seats other than seat0 need custom configuration. Provide that with a
> > default configuration file so we can share it across distros.
> >
> > This file intentionally does not end in .conf so it won't get picked up by
> > the server after a normal installation. gdm, or whatever starts up the
> > servers will have to explicitly specifiy this config file.
> >
> > This file replaces the one currently written by systemd's multi-seat-x
> > binary:
> > http://cgit.freedesktop.org/systemd/systemd/tree/src/login/multi-seat-x.c
> >
> > CC: Lennart Poettering <lennart at poettering.net>
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> >  config/Makefile.am               |  2 +-
> >  config/non-seat0.conf.multi-seat | 18 ++++++++++++++++++
> >  2 files changed, 19 insertions(+), 1 deletion(-)
> >  create mode 100644 config/non-seat0.conf.multi-seat
> >
> > diff --git a/config/Makefile.am b/config/Makefile.am
> > index da81d77..327d07e 100644
> > --- a/config/Makefile.am
> > +++ b/config/Makefile.am
> > @@ -44,4 +44,4 @@ endif # CONFIG_NEED_DBUS
> >
> >  endif # !CONFIG_UDEV
> >
> > -EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf fdi2iclass.py
> 10-quirks.conf
> > +EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf
> non-seat0.conf.multi-seat fdi2iclass.py 10-quirks.conf
> > diff --git a/config/non-seat0.conf.multi-seat
> b/config/non-seat0.conf.multi-seat
> > new file mode 100644
> > index 0000000..34008ce
> > --- /dev/null
> > +++ b/config/non-seat0.conf.multi-seat
> > @@ -0,0 +1,18 @@
> > +# This is the default configuration for servers on seat-1 and above.
> > +#
> > +# Start the server with -config non-seat0.conf.multi-seat, or
> alternatively
> > +# rename the file to end in .conf and put it in the standard config
> > +# directory (though it will apply to _all_ seats!).
> > +#
> > +# * Disable VT switching with Ctrl-Alt-F1
> > +# * Force a grab on all input devices to detach them from the VT
> subsystem
> > +#   to avoid event leakage.
> > +
> > +Section "ServerFlags"
> > +        Option "DontVTSwitch" "on"
> > +EndSection
> > +
> > +Section "InputClass"
> > +        Identifier "Force input devices to seat"
> > +        Option "GrabDevice" "on"
> > +EndSection
> 
> Is that all there is to it? Looking at this makes me sad that you can't
> make sections filtered by seat. A project for another day, I guess.

had a quick look at this, it's not hard to add a MatchSeat option. looks
like the requirements are pretty much limited to:
* add a seat string to struct InputAttributes
* add the hal/udev conversion from ID_SEAT to fill that attribute
* add the bits to InputClassMatches(), and since we already do substring
  matching it'd literally be two lines of code.

adding this is an ABI break though (not really a big problem).

things that really matter though:
* we only have positive matching, not negative one. the seat configuration
  seems to be "everything but seat-0", which we could only express by having
  a InputClass that enables it for anything with seat-* set and then
  a second InputClass that disables it again for seat-0.
* the wacom driver forks off devices (one per tool). that driver would need
  updates for the new ABI - and in that case I'd like to really abstract the
  InputAttributes into a proper ABI instead of just a struct.
* we can't translate MatchSeat to ServerFlags so we'd still need a
  separate config file

two is the real stickler though. the first two are quickly hacked up or
worked around, the third one needs more dedication.
 
> Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>

thanks.

Cheers,
   Peter



More information about the xorg-devel mailing list