piątek, 25 maja 2012

Multiseat setup - Configuring lightdm

There are two pieces of information: a good one and a bad one. The good one is that I did successfully run a Xephyr-based multiseat setup using lightdm as display manager. The bad one is that I managed to modify lightdm from the 1.0 series. It is happily found in Debian wheezy now, but newer releases will likely make it into testing eventually.

Anyway, lets get to configuring it!

The tree of the installed files looks very similar to the layout used for gdm2. The changed/modified entries are indicated in red.

/
|
+-/etc
|  |
|  +-/default
|  |  |
|  |  +-multiseat
|  |
|  +-/lightdm
|  |  |
|  |  +-lightdm.conf
|  |
|  +-/X11
|  |  |
|  |  +-xorg.conf
|  |
|  +-/init.d
|  |  |
|  |  +-multiseat
|  |
|  +-/udev
|  |  |
|  |  +-/rules.d
|  |     |
|  |     +-00-multiseat.rules
|  |
|  +-/multiseat
|     |
|     +-multiseat.conf
|     |
|     +-/scripts
|        |
|        +-helper-functions
|        |
|        +-match-and-name
|        |
|        +-multiseat-greeter
|        |
|        +-fake-greeter
|        |
|        +-Xephyr-seat
| 
+-/usr
    |
    +-/share
       |
       +-/xgreeters
          |
          +-multiseat-greeter.desktop
          |
          +-xinerama.desktop

Now let me explain the files.

lightdm.conf uses the three options added by the patches found on the branch in Launchpad. In [LightDM] there is common-vt=true. It means that all the X servers will use the same vt number. Since in a multiseat setup there are at least two seats, I used a convention that the default seat options are for the Xephyr seats proper, while the X server which covers all the monitors will use a dedicated configuration section of its own. The  xserver-pass-seat-name=true option means that the command used to start the X server (xserver-command) will be added a parameter whose value is the number of the DISPLAY for this X instance. The greeter-pass-seat-id=true means that the command used to start the greeter (found in the Exec entry of the .desktop file) will be added parameters whose values are the number of the DISPLAY for this X instance and the seat name as found in lightdm.conf. E.g., if there are [Seat:1] and [Seat:2], then the seat names will be 1 and 2. Thanks to the greeter-pass-seat-id=true option the multiseat-greeter is simpler and it moves only the Xephyr of interest to its desired position. The Xauthority files are also different than in the gdm-based setup. The fake-greeter just sleeps. But, in order to cleanly shut down, it handles the TERM signal and kills the sleep command if a signal is received. Thanks to the xserver-pass-seat-name=true option the Xephyr-seat is also a bit simpler, as it expects seat name and display number as parameters. The desktop files are used to specify the command to be run as a greeter.

The fake greeter is a kind of a hack. In fact it would be best to force lightdm not to start a greeter at all, just X server.

All works similar to the gdm2 case. Only the configuration of the display manager and location and names of Xauthority files are different.

Brak komentarzy:

Prześlij komentarz