Re: [gdm-list] hacking gdm
- From: Brian Cameron <Brian Cameron Sun COM>
- To: Fernando Benites <ISkywalker gmx de>
- Cc: gdm-list gnome org
- Subject: Re: [gdm-list] hacking gdm
- Date: Tue, 06 Sep 2005 14:47:48 -0500
Fernando:
I would like that gdm shows me which actions i want to do, more detailed.
Like rebooting a new kernel or OS. with kdm and lilo it is possible.
With lilo -R label, i can boot the label. With grub i need a modified
menu.lst and grub-set-default number. I was looking in the gdm to see how it
could work but i dont get it. Is there any flow diagram for gdm? or i do
need to use gdb?
thx in advance
You will notice that the GUI programs setup the menu in gdm_login_gui_init()
in gdm2/gui/gdmlogin.c and in greeter_system_append_system_menu in
gdm2/gui/greeter/greeter_system.c. It would probably be best if this logic
could be expanded to test to see if grub or lilo are available. If so,
additional menu choices can be used. If it isn't possible to identify if
lilo/grub are available, then gdm.conf options could be used to specify
that the additional menu choices should appear (these should be off by
default). It should be clear looking at gdm2/gui/gdmlogin.c how to
interact with the gdm.conf file (and similar logic needs to be changed
in gdm2/gui/greeter). It will be more work getting this to work in the
greeter code since it doesn't use a menu, but instead just has a reboot
button. Instead of adding multiple buttons, clicking this choice could
popup a window with the choices like the language and session buttons
do.
When Reboot is currently selected, the slave calls _exit with
DISPLAY_REBOOT. If the daemon notices that the slave exits and returns
with DISPLAY_REBOOT, then the reboot_machine() function in
gdm2/daemon/gdm.c gets called. It might make sense to add a
DISPLAY_REBOOT_GRUB and DISPLAY_REBOOT_LILO. The reboot_machine()
function can be enhanced to do the appropriate things for lilo and grub.
If additional information needs to be passed between the slave and daemon
for this to work (for example, if root but not the gdm user can tell if
rub/lilo are available), then you'll have to dig into the interfaces used
for communication. If this is necessary, I'll be happy to explain more
about how this works.
Another choice is that the RebootCommand can already be defined in the
gdm.conf file to be any command you like, so you can hardcode it to work
with grub or lilo. If what you really want is multiple reboot commands,
perhaps this could also be added by having more gdm.conf options
(RebootCommand2, etc.) though this would be more clunky.
Hope this helps. Let me know if you need any more information.
Brian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]