Is it possible for a X server to have multiple displays?
Quoting X(7)
:
From the user's perspective, every X server has a display name of the form:
hostname:displaynumber.screennumber
Each X server has one display (which may include multiple monitors, or even no monitors at all). Using multiple displays (in the X sense) requires multiple X servers; that's how you get multiple seats too.
As far as sharing goes, I think each X server expects to "own" the devices it's using at any given time, so you can't have input from a single keyboard going to multiple X servers simultaneously, or the output of multiple X servers combined on a single monitor. X servers can hand hardware off, which allows you to run X servers on multiple VTs and switch between them (this is how simultaneous logins are handled e.g. in GNOME). You can also nest some X servers (Xephyr
, xpra
...), so input goes to your main current X server, and gets passed on to the nested X server in a window; and the output of the nested X server is displayed in a window by the main X server.
On Linux, you could write a multiplexing input driver in the input layer to share input devices, but that's a different layer altogether than the X server.