RE: Customizing gdm



"Inger, Slav (S.B.)" <vinger ford com> wrote:
>Mike Oliver [mailto:Mike Oliver Sun COM] wrote:
>> Do you absolutely have to have this new dialogue as part of the DM
>> interaction?  If it could be something that happens _before_ the DM
>> greeter shows up then it could be handled in the Init script.  If it
>> can be done after login (by which time you know the username) then it
>> can happen in the PreSession script or even in the Session script.
>
>I'm assuming PreSession/Default gets executed right after the greeter gets the
>input?

The PreSession script (not necessarily /Default, it can be customised
per-display) gets executed after the user has authenticated successfully.
It's one of the steps GDM takes on the way to starting up the user's desktop.

>My problem is that I need to give the user a graphical menu from which
>to select the options they need to pick PRIOR to actual login.  I don't really
>care if I know the username by then, but what I do care about is that it should
>not try to authenticate before they pick an item from the custom menu.  I was
>thinking I could whip something up in Perl/Tk that will give them the dropdown
>I'm after.  The question is:  first, will gdm allow something like this in
>gdm/PreSession/Default, and second, could it be too late by then because the PAM
>authentication might have already been attempted?

PreSession is too late.  At PreSession time PAM authentication has not only
been attempted, it's succeeded.

You could either launch your menu from the Init script, which runs before
the greeter, or you could launch it from a PAM module that runs early in
the PAM stack.  Without knowing too much about your requirements I'd guess
it's probably easier and better to launch it from PAM.  (This is a gross
hack, it isn't at all how PAM is intended to operate but you don't have a
lot of options here.)

If you do launch your thing fro mPAM then you don't have to worry about
multiple incarnations being launched from repeated Init invocations and
more importantly you're "in-line" with the authentication mechanism.  This
makes it much easier to enforce the requirement that the user must make a 
choice from your menu before authenticating -- you can construct the PAM 
stack such that the user will have to satisfy your PAM module's menu 
requirement before he even gets prompted for a username or password. 
Presumably you'll stash the result someplace (eg in a per-display file) 
that can be read later by whatever needs to know which menu selections
were made.

> George [mailto:jirka 5z com] wrote:
G> There was a patch a long time ago that was adding scripts (plugins, I can't
G> exactly remember) to the graphical greeter, but I completely lots the
G> reference to it, and forgot about it until today when it came to my mind with
G> respect to this.  To bad it's past feature freeze date for gnome 2.4 ... :(
>
> I'm sure we're not the only ones interested in this functionality - anyone care
> to guesstimate on when gdm might support custom widgets out of the box?

I could really use something along these lines in about a year's time,
so if no-one else has gotten around to doing it by next spring then I
guess I'll give it a shot.  The usual problem with this kind of thing is
nailing down the requirements, once that's done the coding is easy.

Mike.
-- 
mike oliver sun com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]