Gentoo Wiki ArchivesGentoo Wiki

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

X configuration

know thy devices

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

Warning: If not the AlwaysCore option is set for the second device you will get a LookupDeviceIntRec id=0x0 not found error each time a multimedia key is pressed.

For more information see: HOWTO_Microsoft_Natural_Ergonomic_Keyboard_4000

Testing

Now you want to test if it works, right?

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

Note: There is also a KDE bug#125559 that causes the Up Arrow to be confused with PrintScrn on evdev keyboards, which should be fixed in the next release (KDE 3.5.6)

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

TODO

Have to try this next weekend...

Retrieved from "http://www.gentoo-wiki.info/HOWTO_Multiseat_X"

Last modified: Thu, 04 Sep 2008 13:01:00 +1000 Hits: 27,645

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should list their apartments, townhouses and units in Australia.