PDA

View Full Version : Multiseat Linux - One computer, multiple monitors, mice, and keyboards


stafio
05-12-2007, 11:37 AM
Why multiseat?
Alot of the time, both my fiance and I would want to use the computer. What this usually meant, was that I was working on the desktop and she was using a laptop. In some cases I would be on a laptop and her on the desktop. I find using laptops to be uncomfortable for extended periods of time, so I wanted to do something about this.

I could have set up another desktop, but that would take up more space than I'd like, make more noise, and mean maintaining two systems. The multiseat solution means that there is more space available, less noise, and only one set of hardware/software to maintain. Now that I've gotten the reasons out of the way, let's get down to business.

There are some other howto multiseat articles online, linked at the bottom of this post, but I've taken a slightly different approach from the others, which I think allows for easier troubleshooting if you were to run into problems.

My setup
Motherboard: Asus K8N
Processor: AMD Athlon 64 3000+
1024MB Ram
EVGA GeForce FX 5200 AGP 128MB
EVGA GeForce FX 5200 PCI 128MB
PS2 Mouse
PS2 Keyboard
USB Mouse
USB Keyboard
SB Live!
OS: Linux Mint Bianca

Again, for simplicity of maintenance, I went with the same make and model of video card so I would only have to maintain one driver. Things might get complicated if you had two cards by the same manufacturer that need different drivers. I'm not sure how that would work.

I would recommend making a file in your home folder to store information needed for the xorg.conf file. For the purposes of this howto, I'll call it xinfo.txt. Also, make a backup of your /etc/X11/xorg.conf file.

Step 1 - Dual Monitor Display
The first thing that I did was make sure that I could get both monitors up and working off of the separate video cards at the same time. For this, we'll need to make some additions to /etc/X11/xorg.conf.

You'll need to create Monitor and Screen sections for each seat. There are a few ways to do this.
1) Connect your first monitor to your primary video card and run "sudo dpkg-reconfigure xserver-xorg"
Save the configuration file and copy the Monitor and Screen Sections to your xinfo.txt file.
Disconnect your primary monitor, connect your secondary monitor and repeat the reconfigure and record the info.

2) I did the same reconfigure of X, but using Adminmenu in Libranet. I still have a small partition that I have Libranet sitting on. :) Out of all of the distros I've used, none have provided a more accurate, more detailed detection of my monitor/resolution settings than Libranet.

3) If your comfortable enough with xorg.conf, you can probably figure out the details for these sections on your own and fill them in.

Now it's time to get the information about the video cards. Video cards are identified by their address on the PCI bus. We can list the hardware on the PCI buses using the lspci command. On my system, the lspci command gives the following result:

lspci | grep VGA
Output from mine:
01:00.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1)
02:0a.0 VGA compatible controller: nVidia Corporation NV34 [GeForce FX 5200] (rev a1)

Record this info in your xinfo.txt file. You'll need to convert the BusID to decimal for the xorg.conf entries. This should be easy enough to do, so I'm not going to document it here.

At this point, you can restore the backup of your original xorg.conf file, as it's time to make the first revisions to the file. At this stage, we need to add the Video card entries as well as the Monitor and Screen sections. Ensure that each receives a unique Identifier. I would recommend naming your screens Screen0 and Screen1 for a two-seat system. Assign your primary video card and monitor to Screen0 and your secondary video card and monitor to Screen1. Here are the entries from my xorg.conf:


##### VIDEO CARDS #####

Section "Device"
Identifier "NVIDIA Corporation NV34 [GeForce FX 5200] 1"
Driver "nvidia"
BusID "PCI:1:0:0"
EndSection

Section "Device"
Identifier "NVIDIA Corporation NV34 [GeForce FX 5200] 2"
Driver "nvidia"
BusID "PCI:2:10:0"
EndSection

##### MONITORS #####

Section "Monitor"
Identifier "Samsung SyncMaster 750(M)s(T)"
VendorName "Samsung"
ModelName "Samsung SyncMaster 750(M)s(T)"
HorizSync 30.0 - 70.0
VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection

Section "Monitor"
Identifier "Samsung Samtron 75(M)E (Plus)"
VendorName "Samsung"
ModelName "Samsung Samtron 75(M)E (Plus)"
HorizSync 30.0 - 70.0
VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection

##### SCREENS #####

Section "Screen"
Identifier "Screen0"
Device "NVIDIA Corporation NV34 [GeForce FX 5200] 1"
Monitor "Samsung SyncMaster 750(M)s(T)"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768" "800x600" "640x480"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "NVIDIA Corporation NV34 [GeForce FX 5200] 2"
Monitor "Samsung Samtron 75(M)E (Plus)"
DefaultDepth 24
SubSection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 15
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
EndSubSection
SubSection "Display"
Depth 24
Modes "1024x768" "800x600" "640x480"
EndSubSection
EndSection


To test, modify the ServerLayout section and add Screen 1 as done here:


Section "ServerLayout"
Identifier "Seat0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" LeftOf "Screen0"
InputDevice "PS2Mouse" "CorePointer"
InputDevice "PS2Keyboard" "CoreKeyboard"
EndSection


Restart your X server by hitting ctrl-alt-backspace. If all went well, you should be able to login and have a dual monitor display working.

Step 2 - Configuring input devices

The next thing to do is add the USB keyboard and mouse to your xorg.conf file.

The mice are easy to locate. Each mouse has an entry in the /dev/input directory. An ls can identify the mice.

ls /dev/input/mouse*
Output from mine:
/dev/input/mouse0 /dev/input/mouse1

For the keyboards, we'll need some information from /proc/bus/input/devices. From a terminal, run cat /proc/bus/input/devices
Output from mine:
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/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff ffffffff
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=15ca Product=00c3 Version=0512
N: Name="USB Optical Mouse"
P: Phys=usb-0000:00:02.1-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103

I: Bus=0003 Vendor=1267 Product=0103 Version=0101
N: Name="HID 1267:0103"
P: Phys=usb-0000:00:02.1-2/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe
B: LED=7

I: Bus=0003 Vendor=1267 Product=0103 Version=0101
N: Name="HID 1267:0103"
P: Phys=usb-0000:00:02.1-2/input1
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
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

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input4
H: Handlers=kbd event4
B: EV=40001
B: SND=6

I: Bus=0011 Vendor=0002 Product=0005 Version=0000
N: Name="ImPS/2 Generic Wheel Mouse"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input5
H: Handlers=mouse1 event5 ts1
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=103

Some USB keyboards will have two entries, as mine does: event2 and event3. That's ok because we'll be using the Physical address rather than the event in the X configuratin file. The event associated with my USB keyboard is not always the same when I boot up, making it unreliable to use for the multiseat setup.

Add the keyboard and mouse entries to your xorg.conf file. Again, make sure each keyboard and mouse has a unique Identifier. To keep things straightforward, I used PS2Keyboard, USBKeyboard, PS2Mouse, and USBMouse as my Identifiers.

Here are the entries in my xorg.conf:
##### KEYBOARDS #####
Section "InputDevice"
Identifier "PS2Keyboard"
Driver "evdev"
Option "Device" "/dev/input/event0" ### event device according to /proc/bus/input/devices
Option "XkbModel" "evdev"
Option "XkbLayout" "us"
EndSection

Section "InputDevice"
Identifier "USBKeyboard"
Driver "evdev"
Option "Phys" "usb-0000:00:02.1-2/input0" ### physical address according to /proc/bus/input/devices
Option "XkbModel" "evdev"
Option "XkbLayout" "us"
EndSection

##### MICE #####

Section "InputDevice"
Identifier "PS2Mouse"
Driver "mouse"
Option "Device" "/dev/input/mouse1"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
Identifier "USBMouse"
Driver "mouse"
Option "Device" "/dev/input/mouse0"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

I had problems using the original kbd driver for the PS2 keyboard, so I had to change it to use evdev, along with the USB keyboard. I will detail some of the problems I had setting up the keyboards in my next post. For now, I've focused on what worked.

Now it's time to test the keyboards and mice. Add the additional keyboard and mouse to the ServerLayout Section, but comment them out by placing a # prior to them.
The ServerLayout Section will now look something like this:

Section "ServerLayout"
Identifier "Seat0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" LeftOf "Screen0"
InputDevice "PS2Mouse" "CorePointer"
InputDevice "PS2Keyboard" "CoreKeyboard"
# InputDevice "USBKeyboard" "CoreKeyboard"
# InputDevice "USBMouse" "CorePointer"
EndSection

Restart the X server. If X fails to start, double check all of your settings to make sure that Identifiers are matched appropriately. Also, refer to my keyboard section in the next post and all of the links at the bottom of this post. Assuming everything worked, comment out the PS2 Keyboard and Mouse and un-comment the USB keyboard and mouse in the ServerLayout. Restart X and ensure that all is working.

Once any keyboard/mice issues are sorted out and you can get X working with each set, you should be very close to having a multi-seat system up and running. You'll need to create a second ServerLayout section and assign one set of keyboard and mouse to each. I used Seat0 and Seat1 as my Identifiers. Here are my ServerLayout entries:

Section "ServerLayout"
Identifier "Seat0"
Screen 0 "Screen0" 0 0
InputDevice "PS2Mouse" "CorePointer"
InputDevice "PS2Keyboard" "CoreKeyboard"
EndSection

Section "ServerLayout"
Identifier "Seat1"
Screen 0 "Screen1" 0 0
InputDevice "USBMouse" "CorePointer"
InputDevice "USBKeyboard" "CoreKeyboard"
EndSection

Step 3 - Set up two X servers

The next step is to modify gdm.conf so both X servers start up when you boot.
sudo gedit /etc/gdm/gdm.conf
Locate the servers section and set up two entries. I renamed my existing Standard0 to be something more meaningful and added a second server.

[servers]
# These are the standard servers. You can add as many you want here and they
# will always be started. Each line must start with a unique number and that
# will be the display number of that server. Usually just the 0 server is
# used.
0=XServer0
1=XServer1

Now define the servers. I commented out the original definition and created two new entries. Use the Identifiers from your xorg.conf file for the values after -layout.

# Definition of the standard X server.

##### HERE'S THE ORIGINAL ###############
##[server-Standard0]
##name=Standard server
##command=/usr/X11R6/bin/X -br -audit 0
##flexible=true
####### END ORIGINAL ####################

[server-XServer0]
name=Standard server
command=/usr/X11R6/bin/X -nolisten tcp -novtswitch -sharevts -layout seat0
flexible=true

[server-XServer1]
name=Standard server
command=/usr/X11R6/bin/X -nolisten tcp -novtswitch -sharevts -layout seat1
flexible=true

Reboot and if all went well, you should see your primary monitor come on first and your secondary monitor a few seconds later, each running their own X! Sometimes my mice get mismatched with the keyboard and monitor. If this happens, I reboot and things match up the way they should. I'm going to try and fix this in the next couple of days.

Resources that I used:
http://www.linuxtoys.org/multiseat/multiseat.html
http://gentoo-wiki.com/HOWTO_Multiseat_X
http://netpatia.blogspot.com/2006/09/multiseat-computer-with-ubuntu.html
http://blog.chris.tylers.info/index.php?/categories/6-X-Window-System-X11

stafio
05-12-2007, 11:48 AM
I had to try several times to get my keyboards working properly. Especially the USB keyboard.

According to man evdev, the following should have worked for my keyboard:
Section "InputDevice"
Identifier "keyboard"
Driver "evdev"
Option "evBits" "+1"
Option "keyBits" "~1-255 ~352-511"
Option "Pass" "3"
Option "Phys" "usb-0000:00:02.1-2/input0"
EndSection

However, I tried that and several variations including using Option "Name" "HID 1267:0103" and a few other variations that I can't remember. The only thing that I could get to work is what's documented in the post above. If you are trying to do this, you may require a lot of trial and error to get your keyboards working properly.

In some cases, most keys on my keyboard would work, but pressing the up arrow would take a screenshot and a few keys were just non-functional. In other cases, X would just go to a black screen. It wouldn't crash, but it wouldn't work either. In these cases, I would reboot to the terminal and use pico to un-commnet/re-comment the keyboard and or mouse in X to a working configuration, restart X, and hit the web to do some research.

If you find that one keyboard or mouse is controlling both of the X servers, ensure that you have "CorePointer" and "CoreKeyboard" in the ServerLayout section. I hadn't done this and one mouse was working on both X servers while the other mouse didn't work at all.

Use the links at the bottom of the above post for reference and be patient. If you can get the dual monitor display working off of the separate video cards, you are very close to having a multiseat system up and running.

fos
05-12-2007, 06:14 PM
Thanks for the great post.

fos

danieldk
06-07-2007, 04:50 PM
Wow, nice howto, thanks!

stafio
07-09-2007, 12:36 PM
One small update to this. I have the onboard sound on my motherboard connected to speakers and my sound card connected to headphones, one for each X session. Occasionally, both X sessions may be using one sound card, or I just want to switch to the speakers or headphones depending on the situation. I found a handy little application to facilitate this. asoundconf-gtk allows you to select the sound card that should be used from a dropdown menu. That's really all there is to it. Most programs have to be re-started if you switch sound cards, but it's simple and does the job.

ramaddan
12-24-2007, 06:59 PM
Hi,

I was just wondering. Is it possible to do the same thing with just one Graphic Card, since I don't have two.

Thanks.

bluesdog
12-24-2007, 11:15 PM
Hi,

I was just wondering. Is it possible to do the same thing with just one Graphic Card, since I don't have two.

Thanks.
You’ll need a graphics card with "dual head" output support.

For example, most recent video cards have both a DVI and a VGA output, and some even have dual DVI output, so it's possible to configure simultaneous, separate displays using such a card.

Older cards, or those with a single output, are incapable of providing dual head output.

btw, welcome to the forum :)

ramaddan
12-25-2007, 11:52 AM
btw, welcome to the forum

Thanks :)

Hmmm... I was trying to find a solution for my problem, so I came across http://userful.com/

I just would rather use a fully open source alternative.

Are they also using a Dual-Head?

Thanks again.

bluesdog
12-25-2007, 11:48 PM
According to the information on the website (http://userful.com/products/free-2-user), yes:

...All you need is a computer with two monitors connected (e.g., using a dual-head video card) and an extra USB keyboard and mouse.

But afaik, it doesn't really matter if there are two separate single-head cards or a single dual-head one.

I'm fairly certain you can use the how-to outlined here, perhaps slightly modified, for a single dual-head graphics card.

As Linux is multi-user by nature, you can set up as many users as you have available pci slots and sufficient USB interfaces.

If, for example, you already had a dual-head graphics card, you could plug in an additional dual-head graphics card, three more USB mice and three more USB keyboards, and configure the system for a total of four users simultaneously sharing a single computer.

stafio
12-28-2007, 06:50 PM
Is it possible to do the same thing with just one Graphic Card, since I don't have two.

As bluesdog has said, it definitely is possible. The third link I posted at the end of my how-to describes using a dual-head card.

ramaddan
01-03-2008, 08:23 PM
Thanks guys.

I really appreciate your help.

P.S. - That's why I love Linux
1) The community help
2) The possibilities with Linux

stafio
05-25-2009, 10:17 PM
There have been some fairly significant changes in this since I originally posted, so it's about time that I posted some updates here.

Notable Changes:
1) With the newer versions of Xorg, hot-plugging of keyboards and mice needs to be disabled for multiseat to work properly. This can be done by setting the AutoAddDevices and AutoEnableDevices ServerFlags to false.
2) I had some odd issues with things using opengl, notably games, not working on the first seat. The screen would just go black. You could hear the sound from the game, but not get any image. The same game would work fine on the second seat.
The resolution to this was to add a dummy seat as noted here (https://help.ubuntu.com/community/MultiseatX#line-48). For this, ensure you have the xserver-xorg-video-dummy and xserver-xorg-input-void (package names in Debian/Ubuntu) packages installed.

Below is my updated xorg.conf and gdm.conf files.

xorg.conf:
#### MODULES ####

Section "Module"
Load "glx"
EndSection

#### SERVERFLAGS ####

Section "ServerFlags"
Option "DontZap" "no"
Option "AutoAddDevices" "false"
Option "AutoEnableDevices" "false"
EndSection

#### KEYBOARDS ####

Section "InputDevice"
Identifier "Dummy Keyboard"
Driver "void"
EndSection

Section "InputDevice"
Identifier "PS2Keyboard"
Driver "evdev"
Option "Device" "/dev/input/event3" ### event device according to /proc/bus/input/devices
Option "XkbModel" "evdev"
Option "XkbLayout" "us"
Option "XkbOptions" "altwin:meta_win"
EndSection

Section "InputDevice"
Identifier "USBKeyboard"
Driver "evdev"
Option "Device" "/dev/input/event4" ### event device according to /proc/bus/input/devices
Option "XkbModel" "evdev"
Option "XkbLayout" "us"
Option "XkbOptions" "altwin:meta_win"
EndSection

##### MICE #####

Section "InputDevice"
Identifier "Dummy Mouse"
Driver "void"
EndSection

Section "InputDevice"
Identifier "PS2Mouse"
Driver "mouse"
Option "Device" "/dev/input/mouse2"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

Section "InputDevice"
Identifier "USBMouse"
Driver "mouse"
Option "Device" "/dev/input/mouse1"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection

##### VIDEO CARDS #####

Section "Device"
Identifier "Dummy Video Card"
Driver "dummy"
VideoRam 75
EndSection

Section "Device"
Identifier "nVidia Corporation GeForce 8500 GT 1"
Driver "nvidia"
Busid "PCI:2:0:0"
Option "NoLogo" "True"
EndSection

Section "Device"
Identifier "nVidia Corporation GeForce 8500 GT 2"
Driver "nvidia"
Busid "PCI:3:0:0"
Option "NoLogo" "True"
EndSection


##### MONITORS #####

Section "Monitor"
Identifier "Dummy Monitor"
Option "DPMS"
HorizSync 30-70
VertRefresh 50-160
EndSection

Section "Monitor"
Identifier "Soyo 2286 1"
Vendorname "Soyo"
Modelname "Soyo 2286"
Horizsync 31.5 - 80.0
Vertrefresh 56.0 - 75.0
Option "DPMS"
EndSection

Section "Monitor"
Identifier "Soyo 2286 2"
Vendorname "Soyo"
Modelname "Soyo 2286"
Horizsync 31.5 - 80.0
Vertrefresh 56.0 - 75.0
Option "DPMS"
EndSection


##### SCREENS #####

Section "Screen"
Identifier "Dummy Screen"
Device "Dummy Video Card"
Monitor "Dummy Monitor"
DefaultDepth 8
SubSection "Display"
Depth 8
Modes "320x240"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen0"
Device "nVidia Corporation GeForce 8500 GT 1"
Monitor "Soyo 2286 1"
Defaultdepth 24
SubSection "Display"
Depth 24
Modes "1680x1050" "1440x900" "1280x800"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "nVidia Corporation GeForce 8500 GT 2"
Monitor "Soyo 2286 2"
Defaultdepth 24
SubSection "Display"
Depth 24
Modes "1680x1050" "1440x900" "1280x800"
EndSubSection
EndSection

#### SERVER LAYOUTS ####

Section "ServerLayout"
Identifier "MultiSeat"
Screen "Dummy Screen"
InputDevice "Dummy Keyboard"
InputDevice "Dummy Mouse"
EndSection

Section "ServerLayout"
Identifier "Seat0"
screen 0 "Screen0"
Inputdevice "PS2Mouse" "CorePointer"
Inputdevice "PS2Keyboard" "CoreKeyboard"
EndSection

Section "ServerLayout"
Identifier "Seat1"
screen 0 "Screen1"
Inputdevice "USBMouse" "CorePointer"
Inputdevice "USBKeyboard" "CoreKeyboard"
EndSection

gdm.conf (only the relevant section):
#0=Standard device=/dev/console
0=MultiSeat
1=XServer0
2=XServer1

# Example of how to set up DISPLAY :1 to also use Standard.
#1=Standard

# If you wish to run the XDMCP chooser on the local display use the following
# line
#0=Chooser

# X Server Definitions
#
# Note: Is your X server not listening to TCP requests? Refer to the
# security/DisallowTCP setting!

##### HERE'S THE ORIGINAL ######
#[server-Standard]
#name=Standard server
#command=/usr/X11R6/bin/X -br -audit 0
#flexible=true
################################

[server-MultiSeat]
name=Base (dummy) server for multi-seat configuration
command=/usr/bin/X -audit 0 -layout MultiSeat
flexible=false
handled=false

[server-XServer0]
name=Standard server
command=/usr/bin/X -novtswitch -sharevts -layout Seat0
flexible=false

[server-XServer1]
name=Standard server
command=/usr/bin/X -novtswitch -sharevts -layout Seat1
flexible=false

stafio
09-03-2010, 10:54 AM
Here are some updates through the latest releases of Ubuntu: Karmic Koala and Lucid Lynx.

Karmic Koala:
The bad news is that Ubuntu switched to gdm 2.28 in Karmic, which doesn't have some of the necessary functionality for multtiseat. The good news is that gdm 2.20 is available in the repositories and you can switch back to using it and follow the same instructions as above. One annoyance is that the gdm 2.20 package is broken in Karmic, but can easily be fixed (https://bugs.launchpad.net/ubuntu/+source/gdm-2.20/+bug/445256).

Lucid Lynx:
In Lucid, the old gdm 2.20 package is gone and the gdm in the repositories is still not ready for multiseat. Apparently it can be patched to work, but I prefer to stick with the packages in the repository. The good news is that switching to kdm will allow you to get multiseat up and running in Lucid Lynx without too much trouble.

sudo gedit /etc/kde4/kdm/kdmrc

In the [General] section, look for a line reading:
StaticServers=:0
change it to:
StaticServers=:0,:1

Also, change:
ReserveServers=:1,:2,:3
to:
ReserveServers=:2,:3

Then you need to set up the server instances. Under the [X-:0-Core] section, make sure you add
-layout Seat0Then make a copy of the
[X-:0-Core] section and label it [X-:1-Core].

I believe you also need the BusID in the kdm config, which wasn't necessary in the gdm config. It's been a while since I actually set up my kdm multiseat, so I may be mistaken. Here are my two Core entries:
[X-:0-Core]
AutoLoginAgain=false
AutoLoginDelay=0
AutoLoginEnable=false
AutoLoginLocked=false
AutoLoginUser=
ClientLogFile=.xsession-errors
ServerCmd=/usr/bin/X :0 vt07 -audit 0 -isolateDevice PCI:2:0:0 -nolisten tcp -layout Seat0

[X-:1-Core]
AutoLoginAgain=false
AutoLoginEnable=false
AutoLoginLocked=false
ClientLogFile=.xsession-errors
ServerCmd=/usr/bin/X :1 vt05 -audit 0 -sharevts -isolateDevice PCI:3:0:0 -nolisten tcp -layout Seat1

You will also need to set up a second greeter entry for the other seat, but that is very simple and only requires minimal configuration to get it working. Here is mine:
# Greeter config for 1st local display
[X-:0-Greeter]
# See above
#PreselectUser=Default
# The user to preselect if PreselectUser=Default.
# Default is ""
#DefaultUser=johndoe

# Greeter config for 1st local display
[X-:1-Greeter]
# See above
#PreselectUser=Default
# The user to preselect if PreselectUser=Default.
# Default is ""
#DefaultUser=johndoe

Sources that helped me through the setup:
http://sadevil.org/blog/2010/04/04/multiseat-on-debian/
http://wpkg.org/Configuring_multiseat_X_workstation ("KDM configuration" section)

Audio Setup
With the switch to PulseAudio, I had problems getting the two seats to use their respective sound cards. Most things would work, but the odd time something like Flash would play out of the other sound card. As I often find with Linux, the actual set up to get things working properly isn't too complicated. However, the trial and error to find the right set up took a long time.

In the end, I believe this covers everything necessary.
1) Edit/create the ~/.asoundrc file and add/set it to the following:
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
This should tell any applications that are still trying to use Alsa, to hand things off to PulseAudio.

2) Install the PulseAudio Device Chooser sudo apt-get install padevchooser

There are a lot of options within PulseAudio Device Chooser, but the main thing to look for is under Volume Control. Launch the padevchooser if it is not already running, click on its tray icon and select Volume Control. You should see your sound cards listed there. On the right hand side, you should see a green check icon that has a tooltip of "Set as fallback". This is what you use to select your audio device for the user.

3) If you have problems with audio at this point, make sure your multiseat users are in the following groups: audio, pulse, pulse-access. You will have to log out and back in, if you made user -> group assignment changes.

fos
09-04-2010, 11:25 AM
Stafio,

Have you looked at the view count for your Howto?

It is hands down the most popular thread on this site by a wide margin!

Good job!

stafio
09-15-2011, 10:06 PM
Thanks Fos. I'm glad that people are finding this thread interesting/useful. I made the move to Ubuntu Natty a while back and it's time for some updates to this post.

Nothing has really changed in getting multiseat working on Natty from Lucid Lynx. However, I have run into a couple of minor issues.

1) Using KDM, logging out results in being stuck on a black screen. There is a simple fix for this (http://phoronix.com/forums/showthread.php?15162-kdm-logout-crash-black-screen-on-next-login-on-KDE4-(solved)).
Within /etc/kde4/kdm/kdmrc, you need to add
TerminateServer=true
in each [X-:*-Core] section.


2) Logging in to Unity from KDM does not work properly. This leads to the desktop with no unity bar or top panel. I haven't found a fix for this yet.