Re: [gdm-list] Need help running a password reset program during and after login
- From: Brian Cameron <Brian Cameron Sun COM>
- To: Matt Ficken <matthewficken yahoo com>
- Cc: gdm-list gnome org
- Subject: Re: [gdm-list] Need help running a password reset program during and after login
- Date: Mon, 06 Mar 2006 14:24:30 -0800
I have a program that allows our users to request reseting their
password, etc... for various services at our company, logging to our
linux workstations, internal web sites, etc...
I would like to have this program on screen during the login process and
remain on screen after the user has logged in (program should be running
and on screen for the duration of their session). How can I do this? Is
this possible with gdm? would it be easier with a different desktop
manager (xdm, kdm)?
You can launch programs in the GDM Init script (/etc/gdm/Init/Default)
which will show up on the same screen as the login screen. gdmlogin
tends to work better for showing other GUI programs since gdmlogin has
a light window manager, and better manages focus when different windows
are on the screen. gdmgreeter has no window manager, so you may have
some focus weirdness (like users having to do weird things to get
focus from one window to the other) using gdmgreeter. You'll have to
try it and see how well it works.
If you want to use gdmgreeter and have focus problems, I'd accept a
patch to make gdmgreeter manage focus better.
One problem with launching GUI programs at the login screen is that
some users consider this insecure. It is not recommended to run GTK+
based programs as root, which is why GDM runs its GUI as the "gdm"
user. You might consider doing something similar and making sure that
your GUI runs as a non-root user (perhaps as the GDM user). GDM
manages this by having a daemon that does all the work that requires
root access and the GUI runs as "gdm".
One problem is that I don't think there is an easy way to make sure
that the program stays on the screen after the user logs in. You
might be able to achieve this effect by running the program a
second time in the PreSession script. However, if your program
needs to run as the "root" user, this solution may not work so
well since the PreSession script runs as the user.
I'd recommend playing with these options and see if it works for
your needs, and let us know if you encounter any issues and we
can see if we can work through them.
From what I understand, there are 2 login screens/greeters to choose
from, gdmgreeter and gdmlogin. gdmgreeter seems to cover the whole
screen, so it would cover my program. I don't think gdmlogin covers the
Yes, gdmlogin is probably better for you, since you can control the
size of the window, and its location on the screen. It also has a
light window manager so it maanges focus better if there are other
GUI's on the screen started by the Init script or whatever.
I would prefer to use gdmgreeter (I think it looks nicer, and its what
our users are accustomed to), so is there some way it could be modified
to not cover the whole screen, or at least not cover another window?
It would probably be okay to just use a theme that has some blank space
(or modify the theme) so you can place your GUI program where it won't
disrupt the theme. However, you may run into some issues with
gdmgreeter not managing focus well. You may need to hack on gdmgreeter
a bit to get this to work as nice as you want. Some users don't mind
the focus issues, or find them too annoying.
There is a daemon that starts gdmlogin/gdmgreeter (I think its
gdmflexiserver?), so could I get it to launch my program after it
launches gdmlogin/gdmgreeter for the specific X display? if yes, where
would the appropriate place make these modifications be?
Read the GDM docs and look for "BackgroundProgram" in the GDM docs.
http://www.gnome.org/projects/gdm. Look at the section "Configuration".
I'm new to gdm development so I'm also wondering what the best way to
test a modified version of gdm is? When I'm logged in to a development
workstation (I already have a gdm session, using gdm installed with my
linux distro) I try running a development version of gdm login and get
an error message (version number doesn't match gdm daemon) I can run
gdmlogin in a shell with the DOING_GDM_DEVELOPMENT env variable set.
Yes, using DOING_GDM_DEVELOPMENT is useful for testing the gdmlogin
and gdmgreeter program, mostly when making changes that affect the
appearance of the GUI. However, a lot of features of gdmlogin and
gdmgreeter are turned off when you run it this way, so it isn't
often useful for debugging functionality issues.
If you want to test how GDM runs as the login program, you have to
install the version of GDM you want to test and restart gdm via
When I want to run a whole new gdm session (so I can login and
everything that follows) using development gdm, I run gdmflexiserver,
but that runs gdmlogin from my linux distro, so the only way I know to
get around this is to (temporarily) replace gdm in my linux distro.
Surely, there is a better way?
If you really want to get fancy, you probably could have multiple
GDM daemons running on the same machine and have different displays
that each daemon manages. This might be hard to setup, and I have
never tried it...but it would allow you to test a development GDM
while not affecting the main GDM daemon. This may also require
working on a machine with multiple physical displays because I'm
not sure how well multiple GDM daemons would work with flexible
displays. Not sure. The "[servers]" section specifies which
displays each daemon would manage. Also, you might need to
really tweak the config file to make sure the two daemons didn't
mess with each other (such as specify different PidFile's in the
config files, etc.).
Also, this might not work. GDM might notice that the daemon is
already running and not let you start it again. Might require
some hackery to get this working for making a test environment
like you want.
Sorry there isn't an obvious easy better way.
] [Thread Prev