SRSS and GDM 2.32
From Sun Ray User Group Wiki
Contents |
SRSS and the new GDM: an attempt with Debian Linux
SRSS needs an display manager that supports dynamic multiseats, e.g. GDM up to version 2.20. GDM was completely rewritten after that version. Up to now (gdm 2.32), dynamic multiseat functionality is not yet included in the mainline code of the new GDM. Several patches are needed.
Since the information is scattered through bug databases, mailing lists and web sites, I decided to put my notes into this wiki.
Introduction
In the new framework it is ConsoleKit which is responsible for communicating with GDM and tracking sessions and seats. See http://204.152.191.100/wiki/index.php/design_for_newgdm_consolekit_multiseat_multidisplay and http://204.152.191.100/wiki/index.php/testing_for_newgdm_consolekit_multiseat_multidisplay .
One source of the necessary patches is Bugzilla. See https://bugzilla.gnome.org/show_bug.cgi?id=536355 for the GDM patch and https://bugs.freedesktop.org/show_bug.cgi?id=19333 for the ConsoleKit patch.
Another source is the OpenSolaris source repository. The patches are at
http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/ .
In http://src.opensolaris.org/source/xref/jds/spec-files/trunk/base-specs/
are the .spec files for each package which contain upstream
version number, changelog etc.
For my experiments I used the patches from the OpenSolaris repository on a Debian SRSS server running Debian/unstable from December 2010. This branch is currently in "deep freeze" mode, i.e. practically identical to the upcoming Debian 6.0 "Squeeze" release.
Installation
- build ConsoleKit-0.43 with patches
ConsoleKit-01-ck-dynamic.diff, ConsoleKit-02-add-sunray-type.diff and ConsoleKit-07-cores-srss.diff
- build GDM-2.32 with patch
gdm-01-dynamic-display.diff
- apply also the patch from http://mail.gnome.org/archives/gdm-list/2009-November/msg00002.html (see Note 1)
- build GConf-2.32 from sources and apply the "Patch to make GConf use per-session saved-state files" from https://bugzilla.gnome.org/show_bug.cgi?id=617017 (see Note 2)
- install slightly patched versions of
/opt/SUNWut/lib/xmgr/gdm/notify /opt/SUNWut/lib/xmgr/gdm/reset-dpy /opt/SUNWut/lib/xmgr/gdm/remove-dpy /opt/SUNWut/lib/utgdmconfigpath /opt/SUNWut/lib/utxsun
and also the
/usr/bin/gdmdynamic
script and make them executable. My variants are here Media:Gdm3files.tar.gz. (see Note 3). YMMV, especially the gdm config path may be different.
Explanations
- Note 1: Without this patch GDM did not restart the X server when it died, e.g., after logging out from a KDE session.
- Note 2: The login screen of the new GDM is a full Gnome session, with running GConfd daemon, metacity window manager etc. These Gnome sessions all belong to the same user, e.g., "Debian-gdm" with the same home directory
/var/lib/gdm/. But every sesssion's GGonf daemon needs a different place for its.gconf/files. This is possible with GConf >= 2.31 by using an appropriate entry in the file/var/lib/gdm/.gconf.path:
# sources for gconf data: xml:readonly:$(HOME)/.gconf.mandatory # Set per-seat configuration directory xml:readwrite:$(HOME)/$(ENV_GDM_SEAT_ID)/.gconf
Now the .gconf paths look like /var/lib/gdm/SunraySeat13/.gconfd/. Another problem is the .gconfd/saved_state checkpoint file. The patch to GConf mentioned above introduces session-dependent names for this checkpoint file. It now looks like .gconfd/saved_state_machine_5fbd112d7a0f9_session_f99c6c30e0b9c2c4ce697d7b. A small problem with this patch is that these files are never deleted and will accumulate over time. So I added a
/bin/rm -f /var/lib/gdm/.gconfd/saved_stat*
line to the GDM startup script and a
/bin/rm -f $HOME/.gconfd/saved_stat*
line to a script in /etc/X11/Xsession.d/ in order to clean the users' home during login and before starting Gnome.
- Note 3: The new gdm has no longer the
VTAllocationoption and Xnewt chokes when called with avtoption. The patchedutxsunscript strips this option from the Xnewt command line. The gdmdynamic script is from OpenSolaris, with small modifications.
- One nice feature of the new GDM is that you can start additional programs with the GDM session by putting a
*.desktopfile into the/usr/share/gdm/autostart/LoginWindow/directory. So I wrote a small Python script which acts as a nicerutselectutility. It shows the output ofruptimefor the servers in my failover group and allows to switch to another server of this group (by calling utswitch) and displays anews.htmlfile. Screenshot here: Media:GDM3screenshot.jpeg
Experience
- Testing environment with a small number of SunRay terminals: everything seemed to work nicely.
- 60 SunRay terminals:
-
console-kit-daemondied several times with a segfault. It gets restarted by dbus but it has forgotten all existing sessions. When a user logs out afterwards, his DTU hangs in 26D. So either console-kit-daemon has to improve stability or it needs checkpoint/restart capability similar to GConfd's saved_state file. - Sometimes, GDM doesn't realize that a seat has disappeared. It starts every five seconds a gdm-slave which tries to start a session on a non-existing display. This may be related to the consolekit crashes or to the patch from Note 1.
-
That's it for the moment. I spent quite some time with this and decided to switch back to gdm-2.20 for now.

