niedziela, 6 lutego 2011

Multiseat setup - the ingredients II

In this post I would like to talk about a number of Xephyrs running inside one X server.

Xephyr itself is just an X application. The fact that it actually is also an X server is not relevant as far as running a number of Xephyrs in one X server is concerned.

Let's start from the gdm.conf, which is responsible for starting a number of Xephyrs. Each Xephyr is not started directly, but with a wrapper script, Xephyr-seat:




In my setup there is no separate section for each seat's Xephyr, instead the servers 1 and 2 use the same config section [server-Xephyr]. Other difference to netpatia is that no command line parameters are passed to the Xephyr-seat script - they are obtained inside the said script (we will come back to it later when talking about configuration integration with udev). And here comes the Xauthority I talked about last time - inside the Xephyr-seat script two env variables are defined: DISPLAY=0 and XAUTHORITY=/var/lib/gdm/:0.Xauth, which are interpreted by Xephyr. Remember, that we want to put a number (e.g. 2) of Xephyrs inside a running X.  To display an application in a running X we need to authenticate to it and we do it by telling the X on which display we want to have the applications and where is the Xauthority.

What the Xephyr-seat wrapper effectively does is just call the Xephyr binary with appropriate parameters. The Xephyr binary shows just an empty window and it is the gdm that actually starts a login screen (e.g. gdmgreeter) inside each server specified in the [servers] section of gdm.conf.

Here is a nice picture of 4 Xephyrs with an own instance of gdmgreeter each, run on one wide monitor. As you can see there is no Xinerama - but as far as multiple Xephyrs inside one X are concerned, how many monitors are used is of no concern. The beauty of the Xephyr multiseat solution is that covering multiple screens is purely orthogonal to running multiple Xephyrs.

As it turns out, Xephyr does not have any command line parameters suitable to placing it in a specific position inside its surrounding X. So to make them occupy one monitor each we need to resort to some tricks. Again, recall the Xauthority. Stay tuned.

Brak komentarzy:

Prześlij komentarz