Since modern PCs can use two screens at the same time I wonder if it is possible to plug in two keyboards and mouses as well to have the two screens run two (more or less) independent X-sessions at once?
- 66,199
- 35
- 114
- 250
- 9,184
- 13
- 65
- 106
-
related: [Setting up a multiseat configuration](http://superuser.com/q/29879/35237) (@SU) – Tobias Kienzler Dec 31 '10 at 19:31
2 Answers
In short, yes, this is possible. The relevant search string you are looking for is "Multi-seat X".
The Ubuntu wiki, Gentoo wiki, Debian wiki and Arch wiki all have articles related to multi-seat X. A number of other articles can be found on the Xorg wiki page on multiseat and even more can be found on google.
From what I can tell from these articles, there are two ways to do this:
- Multiple X servers, or
- Using Xephyr on top of Xorg.
Which of these methods will work for you will depend on the version of Xorg you are running and your hardware. Multiple X servers seem to be the easier route if your hardware setup supports it. There is also work to be done with the display manager, sound server, and other components -- much of which is covered in the various articles linked above.
Additionally, there is a multiseat display manager (MDM) to automate these configurations. It's not yet integrated in most distributions, though (the mdm package in Ubuntu is a homonym).
-
awesome, I'll try that soon, thanks! will it work with hardware acceleration (openGL)? – Tobias Kienzler Dec 31 '10 at 19:20
-
@Tobias, I'm not sure. I don't immediately think there would be a problem, but that is just a hunch. – Steven D Jan 03 '11 at 19:02
-
sounds great, now I [only have to get it setup](http://unix.stackexchange.com/q/5429/863)... – Tobias Kienzler Jan 05 '11 at 15:06
-
Unfortunately I didn't ever get this running :/ Back when this question was still open I actually ended up with a VM, see https://gaming.stackexchange.com/a/14845/88 – Tobias Kienzler Jun 24 '19 at 07:58
Multiseat is one way to go. But if you want to have 2 mice (or 2 keyboards, or both) with different input streams directed simultaneously to 2 different terminals, you can use xinput: https://wiki.archlinux.org/title/Multi-pointer_X
commands you need (self explanatory):
xinput list
xinput create-master [name]
xinput reattach [slave device name or id] [master device name or id]
I had to reattach my mouse/keyboard AFTER creating the master. Maybe it was just a glitch...
What worked on my side: I had 2 mice, 2 keyboard, 2 terminals:
- focusing terminal-A with mouse-A
- focusing terminal-B with mouse-B
- typing keyboard-A showed the output on terminal-A
- typing keyboard-B showed the output on terminal-B
- 101
- 1