[674] in athena10
Re: GDM Greeter Custom Commands
daemon@ATHENA.MIT.EDU (Greg Hudson)
Tue Dec 2 21:21:48 2008
From: Greg Hudson <ghudson@MIT.EDU>
To: Quentin Smith <quentin@mit.edu>
Cc: athena10@mit.edu
In-Reply-To: <Pine.LNX.4.64L.0812020100090.19068@vinegar-pot.mit.edu>
Content-Type: text/plain
Date: Tue, 02 Dec 2008 21:16:37 -0500
Message-Id: <1228270597.6941.17.camel@ray>
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
On Tue, 2008-12-02 at 01:06 -0500, Quentin Smith wrote:
> 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.
For the specific purpose of running the registration applet on cluster
machines, I would suggest looking into the kludge of having the applet
wrapper script discover the display information.
I believe you can do this by peering at /var/lib/gdm. On my machine, it
contains a file named :0.Xauth. So :0 is the display and that file is
the xauth cookie.
(/var/lib/gdm is only readable by root. I assume that in the course of
a normal login, gdm copies the xauth cookie into a location readable by
the user logging in. The registration applet wrapper would presumably
copy the cookie into a temporary directory owned by user nobody and then
su to nobody and fork off the appropriate program.)