What is it?

Multi Seat refers to a PC that has more than 1 /videocard/monitor/X server/mouse/keyboard set so that more than 1 user can use the system at the same time. This is done locally with one computer, without the need for separate server hardware.

Modern computers are "multi user" in that when one person logs off another person can log in with their own unique profile, settings, and permissions-protected files. Multi-seat takes this to the next level and allows multiple users to use one computer concurrently, all with their own unique profiles and protected files.

Why?

Multiseat has several advantages:

  1. Economic Multiple video devices are often times less expensive than whole computers, also save power

  2. Space One computer often times take up less desk or floor room.

  3. Networking Local multiseat implementations do not need advanced network configuration

  4. Environment One computer is more environmentally friendly than several

  5. Noise One computer makes less noise

  6. Ease Adding additional computers increases package and patch upgrading complexity

Requirements

Hardware

  1. Videocards. Plug them in and connect the monitors to them. Multiseat requires additional video devices, so if you want three seats, 3 video devices are required. Traditionally, PCI-E video cards are used for this. However, USB video devices can serve the same purpose.

  2. Keyboards. If you want to support 2 users plug the keyboard 1 x 6 pin mini-DIN male plugs into the two outlets that most PC's have for keyboard and mouse. If you want more than 2 users, you'll have to use USB keyboards.

  3. Mice. They'll have to be USB mice.

Software

When creating multiseat the manual way using configuration files, x.org is the only thing that is required.

When creating multiseat using the automatic functionality provided by loginctl, either the Gnome Display Manager(GDM) or LightDM display managers will be required in addition to x.org. Other display managers do not support automatic multiseat at this time.

How is it done?

There are 3 ways of doing this, depending on the distribution that you use.

  1. Stretch, Jessie and Sid. Through the use of systemd-loginctl, multiseat creation is handled automatically with just a few commands.

  2. Wheezy, Squeeze, Etch, and Lenny. Everything is done in xorg.conf and gdm.conf (package gdm).

  3. Sarge (Obsolete). Because this distribution still uses xfree86 a special module fakegetty is needed, available from http://www.ltn.lv/~aivils/?proj_id=faketty, written by Aivils Stoss, to allow for the use of multiple keyboards.

Loginctl

The easy, modern way of setting up local multiseat requires no editing of configuration files at all. The init software systemd contains a utility called loginctl which can be used for setting up seats.

Setting up multiseat follows this pattern:

  1. Use loginctl to determine available devices
  2. Locate video card in device list, assign to seat
  3. Reboot
  4. Assign additional devices

When creating seats, loginctl sets up rules in the background only when a video card is a part of the original assignment. Without a videocard, no new seats will be created.

By default, when systemd is implemented and in use every install will be listed as seat0 and all devices will be attached to it. To get the full list of devices, determine the seat status of this seat

 loginctl seat-status seat0

loginctl will return a list of devices which include USB, sound, and other available devices. When creating a new seat simply start with the second video adapter. Video adapters in the list of devices provided by loginctl will contain the letters "drm". You should always leave card0 attached to seat0.

Finally, to create a working seat, issue the following command to loginctl: (using the address provided in your terminal)

 loginctl attach seat1 /sys/devices/pci0000:00/0000:00:12.0/drm/card1

After attaching the video card to the new seat, reboot. There will be two login screens now available, one on each monitor.

Use the same process as above to attach other devices to seat1 such as:

 loginctl attach seat1 /sys/devices/pci0000:00/0000:00:2.0/usb1

Xorg.conf specifics

For an install that does not have systemd, install GDM and make X server links.

  1. Assuming that you already have xorg installed, also install gdm.

  2. Make links to to the X server:
    • for xfree86:

 ln -sf /usr/X11R6/bin/X /usr/X11R6/bin/X0
 ln -sf /usr/X11R6/bin/X /usr/X11R6/bin/X1

 ln -sf /usr/bin/X /usr/bin/X0
 ln -sf /usr/bin/X /usr/bin/X1
  1. Make appropriate changes in /etc/gdm/gdm.conf

...
# Definition of the standard X server.
[server-Standard]
name=Standard server
command=/usr/bin/X1 :0 -layout X1 -dpi 110 -deferglyphs 16 -isolateDevice PCI:0:10:0 vt7
flexible=true
...
# Definition of the second X server.
[server-2nd]
name=2nd server
command=/usr/bin/X0 :1 -layout X0 -dpi 110 -deferglyphs 16 -isolateDevice PCI:1:0:0 -sharevts
flexible=true
...

NOTE: Only the user on the first monitor has the use of vt consoles and can use Ctrl+Alt+F<x> to select them. The other users have a gdm login screen and can use X normally, but have no vt's.

...
00:0a.0 VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX 440 AGP 8x] (rev a2)
...
01:00.0 VGA compatible controller: nVidia Corporation NV18 [GeForce4 MX 4000 AGP 8x] (rev c1)
...

Setup xorg.conf for multiple users

  1. Setup the keyboard Input Device sections:

 ...
 Section "InputDevice"
        Identifier       "Keyboard0"
        Driver           "evdev"
        Option           "Phys"           "isa0060/serio1/input0"
        Option           "XkbLayout"      "us_intl"
 EndSection


 Section "InputDevice"
        Identifier       "Keyboard1"
        Driver           "evdev"
        Option           "Phys"           "isa0060/serio0/input0"
        Option           "XkbLayout"      "us_intl"
 EndSection
 ...

 ...
 I: Bus=0011 Vendor=0001 Product=0002 Version=ab83
 N: Name="AT Raw Set 2 keyboard"
 P: Phys=isa0060/serio1/input0
 S: Sysfs=/class/input/input0
 H: Handlers=kbd event0
 B: EV=120013
 B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
 B: MSC=10
 B: LED=7


 I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
 N: Name="AT Translated Set 2 keyboard"
 P: Phys=isa0060/serio0/input0
 S: Sysfs=/class/input/input1
 H: Handlers=kbd event1
 B: EV=120013
 B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
 B: MSC=10
 B: LED=7
 ...

 ...
  Section "InputDevice"
        Identifier      "Mouse0"
        Driver          "evdev"
        Option          "Device" "/dev/input/event3" 
        Option          "Name" "A4Tech USB Optical Mouse"
        Option          "ZAxisMapping"          "6 7 4 5"
        Option          "Buttons"               "12"
 EndSection


 Section "InputDevice"
        Identifier      "Mouse1"
        Driver          "evdev"
        Option          "Device" "/dev/input/event4" 
        Option          "Name" "A4Tech USB Optical Mouse"
        Option          "ZAxisMapping"          "6 7 4 5"
        Option          "Buttons"               "12"
 EndSection
 ...

 ...
 I: Bus=000

Pulseaudio per user-sessions

### Pulseaudio multi-seat
# !!! Disable automatic module loading in /etc/pulse/default.pa !!!
# e.g. module-detect and module-udev-detect

case ${DISPLAY##*:} in
    0) # TV
        ALSA_SINK='HDMI,3'
        ALSA_SOURCE='PCH,1'
    ;;
    2) # Monitor
        ALSA_SINK='PCH,8'
        ALSA_SOURCE='PCH,0'
    ;;
esac

pactl load-module module-alsa-sink   device=hw:$ALSA_SINK   sink_name=default
pactl load-module module-alsa-source device=hw:$ALSA_SOURCE source_name=default
pactl set-sink-volume   default 100%
pactl set-source-volume default 100%
pactl set-sink-mute     default 0
pactl set-source-mute   default 0

Additional Resources

For even more (assuming the resources are available) information, consider https://wiki.debian.org/LTSP - an alternative server-based solution