Configuring multiseat X workstation

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search

Contents

[edit] Introduction

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.1.


Surprisingly, no major Linux distro offers automated tools to configure a multiseat workstation.

You should be familiar with command line to configure a multiseat X workstation using this HOWTO.


If you have anything to add, feel free to change/correct/add content here - just hit the "edit" link on top of this page.


[edit] xorg.conf configuration

Below, an example xorg.conf configuration with two independent X sessions. Note: Two separate video cards from the same maker are required.

Note especially things written in:


Section "ServerFlags"
    Option         "DefaultServerLayout" "seat0"
    Option         "AllowMouseOpenFail"  "true"
    Option         "AutoAddDevices"      "false"
EndSection

Section "ServerLayout"
        Identifier     "seat0"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier     "seat1"
        Screen      1  "Screen1" 0 0
        InputDevice    "Mouse1" "CorePointer"
        InputDevice    "Keyboard1" "CoreKeyboard"
EndSection


Section "Module"
    Load           "dbe" # Double-Buffering Extension
    Load           "v4l" # Video for Linux
    Load           "extmod"
    Load           "freetype"
    Load           "glx" # 3D layer
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "evdev"
    Option         "Device" "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "pl"
    Option         "XkbRules"   "xorg"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "evdev"
    Option         "Protocol" "ExplorerPS/2"
    Option         "Device" "/dev/input/by-path/platform-i8042-serio-1-event-mouse"
EndSection

Section "InputDevice"
    Identifier     "Keyboard1"
    Driver         "evdev"
    Option         "Device" "/dev/input/by-id/usb-Cypress_WirelessUSB-event-kbd"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "pl"
    Option         "XkbRules"   "xorg"
EndSection

Section "InputDevice"
    Identifier     "Mouse1"
    Driver         "evdev"
    Option         "Protocol" "ExplorerPS/2"
    Option         "Device" "/dev/input/by-id/usb-Cypress_WirelessUSB-event-mouse"
EndSection


Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Plug'n Play"
    ModelName      "BenQ FP937s+"
    Option         "PreferredMode" "1280x1024"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "CRT-0"
    HorizSync       31.0 - 83.0
    VertRefresh     59.0 - 76.0
EndSection

Section "Device"
    Identifier     "Device0"
    VendorName     "ATI Technologies Inc"
    BoardName      "ATI Radeon 9600"
    Driver         "radeon"
    BusID          "PCI:1:0:0"
    Option         "AccelMethod" "EXA"
    Option         "IgnoreEDID"    "on"
EndSection

Section "Device"
    Identifier     "Device1"
    VendorName     "ATI Technologies Inc"
    BoardName      "ATI Radeon 9250 and earlier"
    Driver         "radeon"
    BusID          "PCI:2:5:0"
    Option         "AccelMethod" "EXA"
EndSection                                      

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       8
        Modes      "1280x1024"
    EndSubSection
    SubSection     "Display"
        Depth       15
        Modes      "1280x1024"
    EndSubSection
    SubSection     "Display"
        Depth       16
        Modes      "1280x1024"
    EndSubSection
    SubSection     "Display"
        Depth       24
        Modes      "1280x1024"
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth   24
    Subsection     "Display"
        Depth      8
        Modes      "1024x768"
    EndSubsection
    Subsection     "Display"
        Depth      15
        Modes      "1024x768"
    EndSubsection
    Subsection     "Display"
        Depth      16
        Modes      "1024x768"
    EndSubsection
    Subsection     "Display"
        Depth      24
        Modes      "1024x768"
    EndSubsection
EndSection

Section "DRI"
    Mode           0666
EndSection

[edit] Configuring display manager

[edit] KDM configuration

Your configuration file for KDM will likely be bigger - below, some essential and less-essential changes.

You have to tell KDM to use both X servers for separate sessions.

Note that you have to use PCI IDs which you specified in your xorg.conf file.

Look at the comments, pay attention to everything written in bold.

[General]
# specify :0 and :1 here for two sessions
StaticServers=:0,:1
# make sure :0, :1 are not in ReservedServers
ReserveServers=:2,:3,:4,:5

[X-:0-Core]
# have to match settings from xorg.conf
ServerArgsLocal=-nolisten tcp -layout seat0 -novtswitch -isolateDevice PCI:1:0:0
# try adding -sharevts if it doesn't work for you
#ServerArgsLocal=-nolisten tcp -layout seat0 -sharevts -novtswitch -isolateDevice PCI:1:0:0
# this one enables autologin for user tch 
AutoLoginEnable=true
AutoLoginUser=tch

[X-:1-Core]
# have to match settings from xorg.conf
ServerArgsLocal=-nolisten tcp -layout seat1 -sharevts -novtswitch -isolateDevice PCI:2:5:0
# this one enables autologin for user dasza
AutoLoginEnable=true
AutoLoginUser=dasza

[edit] GDM configuration

At a minimum, you have to provide the following changes to your GDM config file.

Pay attention to everything written in bold.

[servers]
0=Standard0
1=Standard1

[server-Standard0]
name=Standard server 0
command=/usr/bin/Xorg -nolisten tcp -layout seat1 -sharevts -novtswitch -isolateDevice PCI:2:5:0

[server-Standard1]
name=Standard server 1
command=/usr/bin/Xorg -nolisten tcp -layout seat0 -novtswitch -isolateDevice PCI:1:00:0
# try adding -sharevts if it doesn't work for you
#command=/usr/bin/Xorg -nolisten tcp -layout seat0 -sharevts -novtswitch -isolateDevice PCI:1:00:0

[edit] Other configuration

You will have to add users to certain groups if you want them to be able to use removable media, scanners, TV/DVB adapters, sound cards etc.

Supposing you have two users, "tch" and "dasza", add them to /etc/group file:

lp:x:7:tch,dasza
usb:x:43:tch,dasza
cdwriter:x:80:tch,dasza
audio:x:81:tch,dasza
video:x:82:tch,dasza

Without this change, only one user will be able to use a given device.


[edit] Hardware

[edit] video cards

Just about any video card will work - PCI card should be enough for non-gaming.

If you don't have any video card, you can buy a new ATI Radeon with passive cooling (no fan and no noise) for about 30 euro (PCI, Radeon 9200 or 9250, 128 MB RAM) or 40 euro (AGP, Radeon 9600, 256 MB RAM). Such cards are supported out of the box, support 3D desktop effects, have DVI and VGA outputs, are able to do 1920x1200 resolutions if you have a large LCD/TV panel.

If one of your cards is NVIDIA, the things should work for you, but may expect trouble setting up 3D effects on the non-NVIDIA card - NVIDIA replaces the glx library with its own, which will not work with other brands.


[edit] mice and keyboards

Most likely you will use USB mouse and keyboard for additional seats. If an additional seat is going to be a bit farther away from the computer (other corner of the room, or even next room), you may consider a wireless set. Note that most wireless sets have range of no more than 1-2 meters from the receiver, so shop wisely - some sets are e.g. advertised as having 10m range.

If you're paranoid about security and are afraid of intercepting your wireless key presses and mouse movements, but still want to have another seat somewhere else (i.e., next room), read below about extenders.

[edit] extenders

If you want to deliver video signal a bit farther from the computer, you can connect several video cables together, but anything longer than about 2-3m will cause a visible signal degradation. Some users report using 20m good quality shielded VGA cables without any noticeable degradation (up to 1024x768 70hz), so this may depend on the quality of the used cable.

You can use a wireless VGA extender to deliver video signal anywhere in your house, but they have prohibitive prices (several hundred euro and more).

The prices for normal VGA extenders (or DVI and HDMI extenders) start at about 70 euro. In this case, the signal goes in a cat. 5 cable - in consumer devices the video is not sent as packets, so no switches on the way and cat. 5 cable has to go directly from one part of the extender connected to the video card to the other part of the extender connected to the monitor.

You can also find USB or PS/2 extenders for mice and keyboards.

[edit] sound cards

Although it's possible to equip your computer with multiple sound cards (so that each user gets his/her own), such setup is not covered here.

Adding users to audio group in /etc/group should be enough to allow these users to play music, even if all users want to play the music at the same time.


If you use PulseAudio (common for all distributions for a few years now), you have to run it in system mode instead.

[edit] Troubleshooting

As a rule of thumb, the newer your version of X server, the less problems you should have. Some troubleshooting ideas below:

Option      "ProbeAllGpus" "false"
[server-Standard0]
name=Standard server 0
command=/usr/bin/Xorg -nolisten tcp -layout seat0 -novtswitch -isolateDevice PCI:1:0:0

[server-Standard1]
name=Standard server 1
command=/usr/bin/Xorg -nolisten tcp -layout seat1 -sharevts -novtswitch -isolateDevice PCI:2:5:0

Try to use this one (note that seats and PCI IDs changed places):

[server-Standard0]
name=Standard server 0
command=/usr/bin/Xorg -nolisten tcp -layout seat1 -sharevts -novtswitch -isolateDevice PCI:2:5:0

[server-Standard1]
name=Standard server 1
command=/usr/bin/Xorg -nolisten tcp -layout seat0 -novtswitch -isolateDevice PCI:1:0:0

See also http://lists.freedesktop.org/archives/xorg/2009-January/042053.html for more details.


[edit] Contact

If you have problems configuring a multiseat workstation, please ask at xorg mailing list.

If you wish to contact me directly, write me an email: Tomasz Chmielewski <tch (at) wpkg (dot) org>.


[edit] References

Thanks to Chris Tyler for his blog entry about setting up multiseat:

You can also see the links in the X wiki:

Personal tools
Namespaces
Variants
Actions
Navigation
ideas?
Toolbox