HOWTO_Multiseat_X
A multiseat, multi-station or multiterminal configuration is a single computer which supports multiple users at the same time. The configuration typically consist of one monitor, keyboard and mouse for each user.
Contents |
Requirements
- multiple graphic cards (or a dual head one providing multiple PCI adresses) (if you have a single address multi head card, you might be interested in projects around Xnest / Xephyr)
- multiple keyboards and mice (USB; exept one keyboard and one mouse can be PS/2)
- recent kernel (I use 2.6.18, but any >=2.6.12 should work)
- udev
- hotplug
- pciutils
- Xorg: at least version 6.9 / 7.0
X configuration
know thy devices
- Run lspci to get the PCI addresses of your graphic cards.
- Read the file /proc/bus/input/devices to get the addresses of your input devices.
- Remember the kdb eventX indicating the /dev/input/eventX keyboard input device
- and mouseX eventY indicating the /dev/input/mouseX the mouse input device
Writing the configuration - xorg.conf
You need to write or adapt your /etc/X11/xorg.conf:
| File: /etc/X11/xorg.conf |
### General Sections ###
Section "ServerFlags"
Option "DefaultServerLayout" "alltogether"
Option "AllowMouseOpenFail" "true"
Option "AIGLX" "true" ### want AIGLX so put it here
EndSection
Section "ServerLayout"
Identifier "alltogether"
Screen 0 "Screen0" 0 0
....
Screen N "ScreenN" RightOf "ScreenN-1"
InputDevice "Mouse0" "CorePointer"
....
InputDevice "MouseN" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
....
InputDevice "KeyboardN" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "/usr/share/fonts/corefonts" ### fonts according your system
FontPath "/usr/share/fonts/TrueType"
FontPath "/usr/share/fonts/misc"
EndSection
Section "Module"
Load "dbe" ### modules according to your system / graphic cards
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection
Section "DRI"
Mode 0666
EndSection
### One of these sections per seat ###
Section "ServerLayout"
Identifier "seatX"
Screen X "ScreenX" 0 0
InputDevice "MouseX" "CorePointer"
InputDevice "KeyboardX" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "KeyboardX"
Driver "evdev"
Option "Device" "/dev/input/eventX" ### event device according to /proc/bus/input/devices
Option "XkbModel" "evdev"
Option "XkbLayout" "us" ### Language setting
EndSection
Section "InputDevice"
Identifier "MouseX"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mouseX" ### mouse device according to /proc/bus/input/devices
Option "ZAxisMapping" "4 5" ### Wheel mouse
EndSection
Section "Screen"
Identifier "ScreenX"
Device "VideocardX"
Monitor "MonitorX"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600"
EndSubSection
EndSection
Section "Device"
Identifier "VideocardX"
Driver "nvidia" ### or whatever driver you use
BusID "PCI:x:y:z" ### PCI bus address (in decimal) according to 'lspci' (which is in hex)
EndSection
Section "Monitor"
Identifier "MonitorX"
Option "dpms"
EndSection
|
Multimedia Keyboards
Some multimedia keyboards, like for example the "Logitech UltraX media keyboard" or the "Microsoft Natural Keyboard Pro", will register it self as two devices in /proc/bus/input/devices:
| File: /proc/bus/input/devices |
I: Bus=0003 Vendor=045e Product=001d Version=0114 N: Name="Microsoft Natural Keyboard Pro" P: Phys=usb-0000:00:07.4-1.4.1/input0 S: Sysfs=/class/input/input0 H: Handlers=kbd event0 B: EV=120003 B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe B: LED=7 I: Bus=0003 Vendor=045e Product=001d Version=0114 N: Name="Microsoft Natural Keyboard Pro" P: Phys=usb-0000:00:07.4-1.4.1/input1 S: Sysfs=/class/input/input1 H: Handlers=kbd event1 B: EV=f B: KEY=c0002 400 0 0 1 c00 78000 2639fa d841d7ad 9e0000 0 0 0 B: REL=40 B: ABS=1 0 |
To get this to work two InputDevice has to be created in xorg.conf:
| File: /etc/X11/xorg.conf |
Section "InputDevice"
Identifier "KeyboardX:1"
Driver "evdev"
Option "Phys" "usb-*/input0" ### matches event device phys string according to /proc/bus/input/devices
Option "evBits" "+1"
Option "keyBits" "~1-255 ~352-511"
Option "Pass" "3" ### Scan Order
Option "XkbLayout" "se" ### Language setting
EndSection
Section "InputDevice"
Identifier "KeyboardX:2"
Driver "evdev"
Option "Phys" "usb-*/input1" ### matches event device phys string according to /proc/bus/input/devices
Option "evBits" "+1"
Option "keyBits" "~1-255 ~352-511"
Option "Pass" "3" ### Scan Order
Option "XkbLayout" "se" ### Language setting
EndSection
Section "ServerLayout"
Identifier "seatX"
Screen X "ScreenX" 0 0
InputDevice "MouseX" "CorePointer"
InputDevice "KeyboardX:1" "CoreKeyboard"
InputDevice "KeyboardX:2" "AlwaysCore"
EndSection
|
For more information see: HOWTO_Microsoft_Natural_Ergonomic_Keyboard_4000
Testing
Now you want to test if it works, right?
- Run X -layout alltogether to see if you got a working config. If not have a look at the standard output and at the /var/log/Xorg.0.log. May your intuition or The Internet help you solve your troubles.
- Run X -layout seatX per seat and make sure you got the right input devices to the right monitor.
Integration with KDE / kdm
| File: /usr/kde/3.5/share/config/kdm/kdmrc |
### General settings ### # List of permanent displays. Displays with a hostname are foreign. A display # class may be specified separated by an underscore. # Default is ":0" StaticServers=:0,:1 ### List as many as seats # List of on-demand displays. See StaticServers for syntax. # Default is "" ReserveServers=:2,:3 ### Put the rest here as a reserve ### Per seat ### [X-:0-Core] ServerArgsLocal=-nolisten tcp -layout seat0 -sharevts -novtswitch -isolateDevice PCI:x:y:z |
Also change the Keyboard model to Evdev-managed keboard in the Control Center:
Regional & Accessibility » Keyboard Layout » Keyboard model » Evdev-managed keyboard
Integration with GNOME / gdm
| File: /etc/X11/gdm/custom.conf |
### Server settings ### [servers] 0=Standard0 1=Standard1 ... ### per seat - these sections will need to be created ### [server-Standard0] name=Standard server command=/usr/X11R6/bin/X -novtswitch -sharevts -isolateDevice PCI:x:y:z -layout seat0 flexible=false |
Getting Meta keys to work again
evdev keyboard drivers are slightly problematic. Make sure you are using x11-misc/xkeyboard-config instead of x11-misc/xkbdata. If your windows keys don't work, add 'xmodmap -e "add Mod4 = Super_L Super_R" &' to your xsession, xinitrc, foobar.desktop, or whichever X startup script you use.
References
- http://www.c3sl.ufpr.br/multiterminal/index-en.php (overview of all the different methods to multiseat)
- http://en.wikibooks.org/wiki/Multiterminal_with_evdev
- http://blog.chris.tylers.info/index.php?/archives/14-Multiseat-X-Under-X11R6.97.0.html
- http://linuxgazette.net/124/smith.html
- http://userful.com/products/free-2-user A simple, free & easy way to accomplish all the above with no config file editing.
TODO
- Might Option "IsolateDevice" "bus-id" work as well in the xorg.conf? I guess yes.
Have to try this next weekend...
- Might Option "DontVTSwitch" "boolean" work as well in the xorg.conf? <yes>
- Is there an Option for xorg.conf replacing the command line switch -sharevts ?
- Is there an Option
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and real estate agent tools.
