Re: [gdm-list] Internet cafe application



Hi,


> I'm in the process of writing an Internet cafe application for Linux
> and I'd like to, eventually, have on the GDM login screen 3 text
> boxes:
>  - one for a user login with a timecode (basically the idea would be
> that the customer would purchase a timecode which would allow him to
> login for a specific amount of time, and he would enter this timecode
> in the GDM login screen, which would start a default session)
>  - 2 other text boxes for the usual username/password combination,
> which would allow members of the Internet cafe to login into a
> "normal" unix account
> (Note: another way to do this would be to have the timecode login
> screen enabled by default and have a button "I'm a member" that would
> redirect to another window which would show the usual
> username/password combination)
>
> As for the authentication and session opening, I'm pretty sure what I
> need to do is to write PAM module(s) that will do the work needed.
That's right.  PAM modules can be stacked, so the easiest way to
implement what you want is a PAM module that asks:

"Please enter your time code or member user name:"

And if what the user types starts with a number assume it's a timecode
and process it, otherwise set
the PAM_USER item and return early from your pam module so the next
module in the stack can use it (pam_unix).

> As for the login screen modification, I've looked at the GDM and
> simple-greeter code, including GDM login themes, and did not see any
> fairly easy way to do this. So, how should I go about this ? Is there
> a way to write some kind of plugin to GDM ? Do I need to get into the
> code and recompile my own version of GDM ?
I've started on a plugin system here:

http://git.gnome.org/cgit/gdm/log/?h=multi-stack

It's not finished yet, though, and it doesn't support out of tree
plugins, so either way you'd need to recompile your own version of
GDM.

--Ray


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