multiseat

Daniel Stone daniel at fooishbar.org
Sat Jul 30 09:32:16 PDT 2005


On Sat, Jul 30, 2005 at 09:15:25AM -0700, Jesse Barnes wrote:
> I'm pretty sure the bits we need for good multiseat support are already 
> there, aside from configuration specific settings.  The real problem 
> with USB is that many devices don't provide the kernel (or anything 
> else for that matter) with a unique id, so the only way to tell two 
> keyboards apart, for example, is to use the USB device path (sysfs will 
> tell you which hub is plugged into which port, etc.).  So like Jon 
> said, providing each user a USB hub is probably the best way to go 
> (everything plugged into a given hub will be owned by the user on that 
> seat).  Of course, I don't know if anyone has actually set something 
> like this up, but it's theoretically possible with current tools...

It's entirely possible -- the main stumbling points are thus:
	* Working out (initially) which is which.
	* Dealing with hotplugging.

The former is relatively easy.  Parse /proc/bus/input/devices (or
whatever it is) for a list of all the event devices you're interested
in, and poll them all until you get input.

So, pop up a dialog box saying 'press some keys on the third keyboard'
now, and poll across all the keyboard devices you come up with to see
which one is the third keyboard.  Ditto mice.

The second is not so easy.  Basically all you can do is keep track of
what disappeared and assume that will be the next thing to get plugged
in.

It's all entirely possible, it just requires a lot of fiddling around
and gap-filling, usually on behalf of the distributor.  Oh, and careful
selection of video card.



More information about the xorg mailing list