LightDM works well with ALSA only and PulseAudio removed if you wish to have shared audio, an alsamixer equalizer and software mixing.

+

+

In the example below LightDM and MATE with ALSA was installed with PulseAudio removed. PulseAudio could also be used but it requires a more complicated configuration to maintain high audio quality. The relevant hardware used is an ATI Radeon HD 5850 and an Intel Sandy Bridge (onboard) HD 3000. You configuration may vary.

+

+

Open {{ic|/etc/lightdm/lightdm.conf}} and follow the sample. Autologin is optional. This works both as multi-user multiseat and single user multi-seat (in the latter case the sound card will be shared among the seats using ALSA with PulseAudio removed - libpulse itself may be kept for various software dependencies however):

+

+

{{bc|1=

+

[LightDM]

+

greeter-user=lightdm

+

log-directory=/var/log/lightdm

+

run-directory=/run/lightdm

+

+

[SeatDefaults]

+

xserver-command=/usr/bin/X

+

greeter-session=lightdm-gtk-greeter

+

greeter-show-manual-login=true

+

user-session=mate

+

session-wrapper=/etc/lightdm/Xsession

+

pam-service=lightdm-autologin

+

exit-on-failure=true

+

+

[Seat:0]

+

xserver-command=/usr/bin/X :0 -sharevts

+

xserver-layout=Layout0

+

#autologin-user=joeblow

+

#autologin-user-timeout=-1

+

#session-setup-script=/etc/lightdm/scripts/sound_start

+

#session-cleanup-script=/etc/lightdm/scripts/sound_stop

+

+

[Seat:1]

+

xserver-command=/usr/bin/X :1 -sharevts

+

xserver-layout=Layout1

+

#autologin-user=jillschmill

+

#autologin-user-timeout=-1

+

}}

+

+

Next, remove respective {{ic|~/.asoundrc}} files (as well as related PulseAudio config files if you removed that) and follow this template with {{ic|/etc/asound.conf}} for the sound:

+

+

{{bc|

+

ctl.equal {

+

type equal;

+

}

+

+

pcm.plugequal {

+

type equal;

+

# Modify the line below if you do not

+

# want to use sound card 0.

+

#slave.pcm "plughw:0,0";

+

#by default we want to play from more sources at time:

+

slave.pcm "plug:dmix";

+

}

+

#pcm.equal {

+

# If you do not want the equalizer to be your

+

# default soundcard comment the following

+

# line and uncomment the above line. (You can

+

# choose it as the output device by addressing

+

# it with specific apps,eg mpg123 -a equal 06.Back_In_Black.mp3)

+

pcm.!default {

+

type plug;

+

slave.pcm plugequal;

+

}

+

}}

+

+

Finally you must set the {{ic|/etc/X11/xorg.conf}} file. Here is a sample, adjust to your own system configuration after determing hardware information:

Requirements

Keyboards and mice

Any standard PS/2 or USB keyboards will suffice. Same thing for mice.

Graphics hardware

For the best possible result you'll need two graphics cards. I used an nVidia FX5500 AGP and an nVidia 6200 PCI. If you look around a bit you can certainly find new and decent PCI graphics card for a soft price.

It is possible to use only one videocard which has dual heads (like most nvidia cards will have), but this has some limitations: you have to use Xephyr on the second monitor which seems quite a messy solution from what I've read, and for optimal usage both screens need the same resolution.

If you have two pci-express slots, take advantage of them! That way you'll even be able to play two games at the same time. (PCI is too slow to play comfortably)

Processors and memory

If you really are working with two users on the same computer, I'd at least recommend a dual-core processor and plenty of RAM. A fast hard drive (10.000 RPM or higher) is also recommended for comfortable use.

Software

You'll need Xorg with the drivers for your graphics card (according to some sources, the closed source nvidia driver works better than the open source nv driver for this, I have t tested this myself) and the evdev (xf86-input-evdev) driver. That's all. All this can be found in the Arch Linux core and extra repositories.

Some X knowledge

If you know how X works this will be a lot easier. Before you start, I recommend generating a clean configuration with xorgconfig that works with a single screen. Read through this xorg configuration and make yourself familiar. And as usual the manpages will provide you with most of the answers. You may reference some man pages: xorg, xserver, startx, xdm, xinit.
sudo X -configure, X -showopts may give you some hint.

Definitions

For this article to be clear, I'll be using the following definitions:

screen: A screen is something Xorg can display its stuff on. A screen has a monitor and a graphics card assigned to it.

monitor: A physical monitor like the one you're now sitting in front of.

server layout: a definition of which screen, keyboard and mouse to use.

seat: A workplace with a physical monitor, physical keyboard and physical mouse.

Tips and tricks

Set up ssh on your computer, so you can ssh to the machine from another computer (such as a laptop). This is very useful because you'll probably run into X not responding anymore or not giving you picture at all.

Finding out which keyboard and mouse is which: open a terminal and use cat to find out. For example, cat /dev/input/mouse1. If you then move your mouse and you see all weird things happening than that is the mouse you're moving. Same goes for keyboards, which are called eventN.

Try a basic configuration first. Don't start with the fancy stuff yet, get a very basic Xorg working first.

Leave your xorg.conf alone and create a new file, called xorg.conf.multiseat in /etc/X11 to store your new multiseat configuration. After this configuration is working you can overwrite the xorg.conf file with your new xorg.conf.multiseat.

Create a backup of all relevant configuration files. What do you mean you'll skip this one?

Take a look at the full configuration I used at the end of this article before you start.

About evdev

evdev is an Xorg driver which can make use of the kernel event devices, which you can find in /dev/input.

Setting up Xorg

The logic behind this is that you have two server layouts, each assigned with their own keyboard, mouse, video card and monitor.

Defining available input devices

This part of the configuration tells Xorg which input devices it has available. Input devices are keyboards and mice, but can also be, for example, touchscreens and pens.

This section defines my first keyboard, called keyboard0. As you can seen it uses the evdev driver. /dev/input/event1 corresponds with the keyboard connected to the PS/2 port of my computer. Create a section like this for each keyboard you have. Don't forget to modify the identifier of course. Keep the identifier simple and match it with the other names. This keyboard0 will be used for screen0 together with mouse0.

This section defines my first mouse, called mouse0. This uses the regular mouse driver. /dev/input/mouse2 corresponds with the mouse connected to the PS/2 port of my computer. Create a section like this for each mouse you have.

This section defines my first graphics card, called nvidia0. This uses the closed source nvidia driver. Take a close look at the BusID. This option specifies which hardware card to use. You can find out the BusId's with lspci. However, you'll soon find out this doesn't always match. That's because lspci displays the device address in hexadecimal form. Xorg however uses decimal form. So you'll need to convert your address from hexadecimal form to decimal. Thus a device address of 0:0a:0 in lspci would become 0:10:0 in xorg.conf.

Create a section like this for every graphics card you have.

Screens

This section defines my first screen, called screen0. Pay close attention to the "monitor" option. For easy recognition I called it the model of my monitor.

Serverlayout

Here's the fun stuff. This is how everything is added up. This is my first seat, called seat0. Here I tell Xorg for the server layout called "seat0" to use my screen0, which is attached to nvidia0, using keyboard0 and mouse0.

The AutoAddDevices option is now needed to keep HAL from automatically adding all your input devices to all the X servers.

Create a section like this for every seat you have with their respective keyboards, mice and screens.

Testing

Before we start modifying our login manager, we'll first start with testing out the individual seats. If these are working, then we're good to go.

I've used twm (tiny window manager) to test out if my seats work, but there's no reason you can't use KDE, gnome, or any other desktop environment or window manager. I've used this in my ~/.xinitrc:

exec twm

Use the following command to test out an individual seat:

startx -- -layout seat0 -config xorg.conf.multiseat

Do this for every seat you have. If they are all working correctly and the keyboard/mouse combination matches, then congratulations! You are almost finished! In case you are wondering why I didn't you use the full path to my new configuration file, that's because X doesn't allow that when running as non-root. It will search for xorg.conf.multiseat relative to /etc/X11.

Setting up the loginmanager

For KDM (KDE's Display Manager)

Open /usr/share/config/kdm/kdmrc and set the following variables:

StaticServers=:0,:1 #In the case of two seats. If you have three this would become :0,:1,:2 and so forth.
ReserveServers=:2,:3 #You can define here as many as you want, but these should always start at the highest seat + 1.

Next you'll need to add an [X-:n-Core] for each seat (where n = the seat)

Add section like this for every seat you have, and do not forget to change the :0 and the -layout seat0. Note that the "-sharevts" and "-novtswitch" options should be added for all seats except the first one. Otherwise, you can end with rectangles of virtual terminals "showing through" on your primary screen.

For GDM (Gnome's Display Manager)

Note: The following will work with GDM 2.20 but not with newer versions of GDM. GDM 2.20 is in AUR.

Open /etc/gdm/custom.conf and set the following variables (This sample demos two seats):

For LightDM (The Light Display Manager)

LightDM works well with ALSA only and PulseAudio removed if you wish to have shared audio, an alsamixer equalizer and software mixing.

In the example below LightDM and MATE with ALSA was installed with PulseAudio removed. PulseAudio could also be used but it requires a more complicated configuration to maintain high audio quality. The relevant hardware used is an ATI Radeon HD 5850 and an Intel Sandy Bridge (onboard) HD 3000. You configuration may vary.

Open /etc/lightdm/lightdm.conf and follow the sample. Autologin is optional. This works both as multi-user multiseat and single user multi-seat (in the latter case the sound card will be shared among the seats using ALSA with PulseAudio removed - libpulse itself may be kept for various software dependencies however):

Next, remove respective ~/.asoundrc files (as well as related PulseAudio config files if you removed that) and follow this template with /etc/asound.conf for the sound:

ctl.equal {
type equal;
}
pcm.plugequal {
type equal;
# Modify the line below if you do not
# want to use sound card 0.
#slave.pcm "plughw:0,0";
#by default we want to play from more sources at time:
slave.pcm "plug:dmix";
}
#pcm.equal {
# If you do not want the equalizer to be your
# default soundcard comment the following
# line and uncomment the above line. (You can
# choose it as the output device by addressing
# it with specific apps,eg mpg123 -a equal 06.Back_In_Black.mp3)
pcm.!default {
type plug;
slave.pcm plugequal;
}

Finally you must set the /etc/X11/xorg.conf file. Here is a sample, adjust to your own system configuration after determing hardware information:

Troubleshooting

My Windows key doesn't work anymore

Unreliable behaviour (black picture without cursor)

If everything seems to be set up correctly, but for some reason you always get a black picture without a cursor, try setting the first initialized card in the BIOS to be the PCI card one.

Little black boxes/dots on the desktop

This is actually portions of the virtual terminals being painted on top of X. It seems to be caused by the Linux kernel framebuffer. This can be fixed by disabling the framebuffer, or by removing the "-sharevts" option from the primary seat's X args.

Multimedia keys not working

If your keyboard(s) has extra "multimedia" keys, you may find that they stopped working in your multiseat setup. This is because such keyboards are often represented as more then one "event" device. As you did above, cat each /dev/input/event* device, this time pressing multimedia keys. Once you've found the right event device, add a separate keyboard InputDevice section for it, then add that InputDevice section to the corresponding ServerLayout section with the "SendCoreEvents" option, which indicates that input from this device should be handled, despite not being the core keyboard. In the end you should have sections something like the following:

Related problems

PulseAudio

If two users want to use the sound card simultaneously, it is necessary to use a sound server, PulseAudio being most prevalent. Usually, the PulseAudio server runs only for active user and does not allow for multiple user instances. Solution to this problem is using the system-wide PulseAudio server. Although this approach is discouraged by its authors, it is probably most applicable setup.

Configuring for system-wide PulseAudio

Create user pulse and put him into group audio (PulseAudio drops root privileges and changes to user pulse. Group membership allows for device access.)

Create group pulse-access and put users, who will play sound locally into it (Group membership is used for access control for local access to PA daemon.)