Re: [gdm-list] Selecting X server layout from GDM login screen



Torben:

You, in other words, want to communicate information from the GUI login
program to the daemon.  You will notice a bunch of lines of code in
gdmlogin.c that look like this:

     printf ("%c%s\n", STX, language);

STX messages are handled in gdm.c.  You will notice that in gdm2/daemon/slave.c
that gdm_slave_session_start gets the GDM_SESS and GDM_LANG values from the
GUI.  The code could be expanded in gdmlogin.c and slave.c to support a new
option that tells the daemon about the layouts made by the user.  It sounds
like you already got the menu setup with the list of available layouts.  It
would be nice to add this to gdmgreeter.c as well.  Also, it probably makes
sense to add a gdm.conf setting where the user can control whether or not
this menu choice is visible/available.

How do you build the menu?  I suspect that in order for the menu choices
to have mnemonics and human understandable descriptions that it might
be necessary to add some stuff to gdm.conf so that such things can be
defined for the menu?

This is a feature that would be useful to have in CVS head, but any changes
to the gdm.conf file would need to be documented in the docs/C/gdm.xml file.

Brian

I am using my laptop in different places, sometimes connected to an external monitor and sometimes not. As far as the X server is concerned, this can be easily managed by using different server layouts. However, I still have to edit the XF86Config file everytime I want to enable or disable the external screen (and restart GDM and X, respectively).

So what I would like to do is use the list widget of GDM to display a list of valid server layouts. Which works fine except for the fact that I have not found an easy way to actually tell the X server which server layout has been selected by the user. What I have tried is running a post login script which reads the selected value from the GreeterInfo file and sets the value as an environment variable. But unfortunately, GDM does not seem to resolve environment variables which are included in the command entry in gdm.conf. (In the gdm.conf command entry, I simply included the layout option via -layout $BLA.)

I have looked into the GDM source code (2.6.0.9) and confirmed that no resolving is performed. But it also does not look too difficult to include some code for a call to libc (or whatever library has that function) to resolve an environment variable.

However, before I actually try my luck with C coding, I wanted to ask if somebody knows an easier solution...
Thanks in advance for any help
Torben

P.S. I have understood that GDM normally reuses the X server instances. Can a reused X server (i.e. XFree) switch to a different server layout than before? Or do I have to use this special "restart X every time" (forgot the actual name) option?






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