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



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?


-- 
Torben Fruechtenicht, Berlin
torben(at)fruechtenicht.net
--
Do not paddle down the river of golden dreams.



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