[626] in athena10

home help back first fref pref prev next nref lref last post

GDM Greeter Custom Commands

daemon@ATHENA.MIT.EDU (Quentin Smith)
Tue Dec 2 01:07:49 2008

Date: Tue, 2 Dec 2008 01:06:12 -0500 (EST)
From: Quentin Smith <quentin@MIT.EDU>
To: athena10@mit.edu
cc: Geoffrey G Thomas <geofft@mit.edu>
Message-ID: <Pine.LNX.4.64L.0812020100090.19068@vinegar-pot.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Hey-

I investigated the feasibility of adding custom buttons to the GDM greeter 
UI for performing actions such as registration. Unfortunately, this is not 
possible in the version of gdm we're running. It has functionality for 
running custom commands and associating those with buttons, but the 
DISPLAY environment variable is not set for those commands.

gdm 2.20, which ships with Intrepid, is the last in this gdm series. The 
gdm code base has been forked for a complete rewrite, and the custom 
command functionality doesn't appear to exist in the (unfinished) new 
version (but the distros still seem to be using the old branch).

Custom commands don't have DISPLAY set because the button on the greeter 
signals the gdm slave which signals the gdm daemon to run the command. 
Following along in the gdm package's daemon/gdm.c, the GDM_SOP_CUSTOM_CMD 
message is received. gdm looks up the display associated with the slave 
that sent the request, then promptly discards that information and calls 
the custom_cmd function with the requested custom command. gdm runs as a 
daemon and can be associated with multiple displays, so it doesn't have 
DISPLAY set.

It would probably be a 5-10 line patch to set the DISPLAY environment 
variable before running the custom command, but I don't think we want to 
patch a package like gdm for trivial functionality such as this.

--Quentin

home help back first fref pref prev next nref lref last post