View previous topic :: View next topic |
Author |
Message |
dambacher Apprentice
Joined: 11 Feb 2003 Posts: 289 Location: Germany
|
Posted: Tue Nov 05, 2013 5:56 pm Post subject: HOWTO:Multi-Seat with current xorg / udev /systemd |
|
|
Hi everybody
It took me some hours to figure out how to correctly set up the udev rules to tag my docking station inputs to have a multiseat setup with the current xorg servers 1.14.3
So for your convenient use:
/etc/udev/rules/99-seat-rules
Code: |
# rules out different input devices for multiseat
# find docking station and tag it
ATTR{idVendor}=="17ef", ATTRS{idProduct}=="100a", TAG+="docking"
#find nvidia graphics card and tag it
DEVPATH=="/devices/pci0000:00/0000:00:01.0/0000:01:00.0", TAG+="graphics2"
# set ID_SEAT accordingly for all but seat0
SUBSYSTEM=="input", TAG=="seat", TAGS=="docking", ENV{ID_SEAT}="seat1"
SUBSYSTEM=="graphics", TAG=="master-of-seat", TAGS=="graphics2" , ENV{ID_SEAT}="seat1"
SUBSYSTEM=="drm", TAGS=="graphics2" , ENV{ID_SEAT}="seat1"
# What is not special seat gets seat0
SUBSYSTEM=="input", TAG=="seat", ENV{ID_SEAT}=="" , ENV{ID_SEAT}="seat0"
# set all tags accordingly
ENV{ID_SEAT}!="", ENV{ID_INPUT.tags}+="$env{ID_SEAT}" TAG+="$env{ID_SEAT}"
|
/etc/x11/xorg.conf.d/ files combined Code: |
Section "ServerFlags"
Option "AutoAddDevices" "false"
Option "AutoEnableDevices" "false"
Option "DRI2" "on"
Option "Xinerama" "off"
EndSection# 20-intel.conf
Section "Device"
Identifier "Device0"
Driver "intel"
VendorName "intel onboard graphics"
BusId "PCI:0:2:0"
EndSection
Section "Device"
Identifier "Device1"
Driver "nouveau"
VendorName "free NVIDIA driver"
BusID "PCI:1:0:0"
EndSection
# -------------------
Section "InputClass"
Identifier "keyboard-default"
MatchIsKeyboard "on"
Driver "evdev"
Option "xkb_rules" "evdev"
Option "xkb_model" "evdev"
Option "XkbLayout" "de,us"
Option "GrabDevice" "on" # prevent send event to other X-servers
EndSection
Section "InputClass"
Identifier "mouse-default"
MatchIsPointer "on"
MatchIsTouchpad "on"
Driver "evdev"
Option "GrabDevice" "on"
EndSection
# -------------------
Section "InputClass"
Identifier "Default"
Option "Ignore" "on" #default is to ignore devices
EndSection
Section "InputClass"
Identifier "SingleIntern"
MatchLayout "SingleIntern"
MatchTag "seat0"
Option "Ignore" "off"
EndSection
Section "InputClass"
Identifier "SingleIntern"
MatchLayout "SingleIntern"
MatchTag ""
Option "Ignore" "off"
EndSection
Section "InputClass"
Identifier "SingleExtern"
MatchLayout "SingleExtern"
MatchTag "seat1"
Option "Ignore" "off"
EndSection
#30-monitor.conf
Section "Monitor"
Identifier "Monitor0"
DisplaySize 344 194
EndSection
Section "Monitor"
Identifier "Monitor1"
DisplaySize 378 301
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
EndSection
#
Section "ServerLayout"
Identifier "SingleIntern"
Screen 0 "Screen0"
Option "Clone" "off"
EndSection
Section "ServerLayout"
Identifier "SingleExtern"
Screen 0 "Screen1"
Option "Clone" "off"
EndSection
Section "ServerFlags"
Option "DefaultServerLayout" "SingleIntern"
EndSection
|
Then you can start the second seat from a console with
Code: |
startx /usr/bin/gnome-session -- :1 -layout SingleExtern -seat 1 -novtswitch -sharevts&
|
I did not modify gdm to show up on both seats, but this is possible and documented elsewhere.
Last edited by dambacher on Wed Nov 06, 2013 7:15 am; edited 1 time in total |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Tue Nov 05, 2013 7:09 pm Post subject: |
|
|
Moved from Desktop Environments to Documentation, Tips & Tricks.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Wed Nov 06, 2013 5:24 am Post subject: |
|
|
Lovely post dambacher.
You might want to split the files in xorg.conf.d so you have a small code section for each; and perhaps add a note that we should of course adjust parameters to our particular devices (especially identifiers.)
Also, I don't see anything specific to systemd: it appears only to need udev tags applied to devices, which xorg picks up on (does that require evdev?) If it's non-specific, then you might want to edit the post title, so openrc users don't get put off reading it.
Again, nice post, thanks,
steveL. |
|
Back to top |
|
|
dambacher Apprentice
Joined: 11 Feb 2003 Posts: 289 Location: Germany
|
|
Back to top |
|
|
dambacher Apprentice
Joined: 11 Feb 2003 Posts: 289 Location: Germany
|
Posted: Thu Nov 07, 2013 9:36 am Post subject: |
|
|
I just found out that multi-seat handling with sytemd/logind , x and gnome3/gdm3 is not fully elaborated yet. I will update on this.
lightdm, kdm and gdm users (gdm up to version 2.20) can find a solution, e.g. https://help.ubuntu.com/community/MultiseatX |
|
Back to top |
|
|
dambacher Apprentice
Joined: 11 Feb 2003 Posts: 289 Location: Germany
|
Posted: Sun Nov 23, 2014 3:45 pm Post subject: |
|
|
as with systemd-217 and xorg-server-1.16.1 you can use multiseat without patching.
you basically configure two server layouts in a single xorg.conf
but leaving the input devices to be autoattached.
and then use MatchSeat to select the server layout for the seat.
Code: |
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "de"
Option "XkbModel" "pc105"
Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
Section "ServerFlags"
Option "DRI2" "on"
Option "Xinerama" "off"
EndSection# 20-intel.conf
Section "Device"
Identifier "Device0"
Driver "intel"
VendorName "intel onboard graphics"
BusId "PCI:0:2:0"
EndSection
Section "Device"
Identifier "Device1"
Driver "nouveau"
VendorName "free NVIDIA driver"
BusID "PCI:1:0:0"
EndSection
Section "InputClass"
Identifier "keyboard-default"
MatchIsKeyboard "on"
Driver "evdev"
Option "GrabDevice" "on" # prevent send event to other X-servers
EndSection
Section "InputClass"
Identifier "mouse-default"
MatchIsPointer "on"
MatchIsTouchpad "on"
Driver "evdev"
Option "GrabDevice" "on"
EndSection
#30-monitor.conf
Section "Monitor"
Identifier "Monitor0"
DisplaySize 344 194
EndSection
Section "Monitor"
Identifier "Monitor1"
DisplaySize 378 301
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
EndSection
# 40-serverlayout.conf
Section "ServerLayout"
Identifier "seat0"
Screen 0 "Screen0"
MatchSeat "seat0"
Option "Clone" "off"
EndSection
Section "ServerLayout"
Identifier "seat1"
Screen 0 "Screen1"
MatchSeat "seat1"
Option "Clone" "off"
EndSection
|
I have a docking station so I mark all devices from this docking to attach to seat1 by udev magic below.
you maybe just use Quote: | loginctl attach seat1 /sys/devices/your_input_device | to configure your input devices to the seats.
Code: |
# rules out different input devices for multiseat
# find docking station and tag it
ATTR{idVendor}=="17ef", ATTRS{idProduct}=="100a", TAG+="docking"
#find nvidia graphics card and tag it
DEVPATH=="/devices/pci0000:00/0000:00:01.0/0000:01:00.0", TAG+="graphics2"
# set ID_SEAT accordingly for all but seat0
SUBSYSTEM=="input", TAG=="seat", TAGS=="docking", ENV{ID_SEAT}="seat1"
SUBSYSTEM=="graphics", TAG=="master-of-seat", TAGS=="graphics2" , ENV{ID_SEAT}="seat1"
SUBSYSTEM=="drm", TAGS=="graphics2" , ENV{ID_SEAT}="seat1"
# What is not special seat gets seat0
SUBSYSTEM=="input", TAG=="seat", ENV{ID_SEAT}=="" , ENV{ID_SEAT}="seat0"
# set all tags accordingly
ENV{ID_SEAT}!="", ENV{ID_INPUT.tags}+="$env{ID_SEAT}" TAG+="$env{ID_SEAT}"
|
|
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Wed Nov 26, 2014 8:15 pm Post subject: |
|
|
Thanks dambacher, that was a load of info ;) Have to admit I don't find multi-seat half as interesting as multi-head; I'd rather have LTSP or something for an internet cafe or classroom, and keep the separation.
You mentioned that you had this running before without systemd; is it effectively the same setup? ie tag the devices with udev and then assign them in xorg .conf. Seems to be from the ubuntu page, but it'd be nice to have an illustrated setup under openrc.
ISTR we just used to have different server layouts or something, though as I said I'm not a multi-seat user, and in fact see it as out of scope for the "average desktop or laptop" use-case. (Not knocking what anyone else chooses to do, ofc.) Seems like main difference is tagging USB devices according to hub. |
|
Back to top |
|
|
dambacher Apprentice
Joined: 11 Feb 2003 Posts: 289 Location: Germany
|
Posted: Wed Nov 26, 2014 8:44 pm Post subject: |
|
|
Hi steveL
Yes I had a setup running openrc and xfce before switching to gnome3
I used to login on console and then startx -layout $altlayout
And i used udev tagging with these MatchTag entries in xorg.conf .
Bye |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Nov 27, 2014 6:34 pm Post subject: |
|
|
Nice one, thanks. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|