How to lock one mouse/keyboard pair to each screen?

If I understood your needs you have to bind one screen, keyboard and one mouse to one ServerLayout and the others to the second one.

http://cambuca.ldhs.cetuc.puc-rio.br/multiuser/

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

Section "ServerLayout"
    Identifier "Layout1"
    Screen 0 "Screen1"
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
EndSection

This is, as far as I know, the only way to proceed.

Also Arch as one good tutorial:

https://wiki.archlinux.org/index.php/Xorg_multiseat

And Linux Toys show you even how to put in place a 6 seated setup

http://www.linuxtoys.org/multiseat/multiseat.html


Have you tried something like MDM? It looks like it can handle the keyboard/video/mouse mappings in its config file.


One interesting possibility I forgot is what Tyler Szabo's answer to my question Multiseat gaming? @gaming.SE suggests:

I would use VMWare. This might be possible with just VMWare player (you will need to be able to allocate a mouse to a single VM), or you might need to try VMWare workstation (for which I'm quite sure it works). The hardware/software you will need is as follows:

  • Multiple sets of USB input (mice/keyboard/etc.)
  • A license for VMWare Workstation (or another VM system)

    1. Set up a VM as you normally would and power it down.
    2. Configure the USB Controller (found in "Edit virtual machine settings") to "Show all USB input devices"
    3. Start up the VM.
    4. In the menu Navigate to VM -> Removable Devices, and select the inputs to direct to the VM exclusively. (Now one of your keyboard/mouse combinations will only be directed to that VM.)

At this point you have a window that is fully isolated with a set of inputs that will go only to it. You can do this for as many VMs as you can handle (and for as many sets of input as you can handle - I only tested with 2). The only irritating thing that can happen is is you have only 2 sets of inputs (in my case my laptop keyboard, my USB keyboard and 2 USB mice). I set up a VM with my USB Keyboard/Mouse combo, and maximized that to one monitor (you need VMWare tools to do this). For the other I had a problem that my mouse could escape from one VM onto the other (a feature of tools); to get around that I put my second VM in "exculsive mode" thus caputuring my "host" input; I could also have had a second keyboard/mouse combo.

Best of this is, you don't even need multiple monitors, you could do it split-screen style with a bunch of VMs+keyboards+mice.