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



Am Mittwoch, 7. September 2005 00:55 schrieb Brian Cameron:
> Torben:
> > Thanks for your quick answer, Brian. See below for the rest of my answer.
>
> No problem.
>
> >>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?
> >
> > I defined a very simple list box for my greeter theme. Nothing fancy,
> > everything hardcoded.
>
> Really it should be reading the list from the gdm2 code.  When you speak
> of "layouts" aren't we really talking about custom Xserver commands?  I
> suspect that you are passing the "layout" option on to the Xserver via
> command line arguments?

Yes, that's what I'm doing (or rather tried to).

>
> If so, then this is a larger problem that people have requested.  Users
> can define different Xserver commands (like [server-Standard],
> [server-Terminal]).  There's really no reason that you can not define
> your own ([server-foo]) and could pick this in the dropdown list.  This
> would mean the menulist could build the choices from the gdm.conf file.
>
> I think this is a slightly different way of doing what you are wanting,
> but it would probably be more generally useful.  This way sysadmins
> could set up alternative xserver options that they could use if they
> want.  For example, I know one person who had 2 Xservers on their
> machine (one for development testing) and wanted GDM to be able to
> allow him to log into either one.  This might also be useful for turning
> on a11y specific Xserver options.
>
> Perhaps I'm misunderstanding, but it seems to make sense to let the
> sysadmin configure the menu choices via the gdm.conf file.

Okay, you may be right. I have to admit I have not really read that part of 
the GDM documentation (using multiple servers, etc.) yet. Using a custom list 
widget and then reading the server layout from GreeterInfo seemed like an 
quick and easy solution to me, but your proposal might be easier (no coding 
involved).

So with your proposal this would mean I'd have to include two lines in the 
[servers] section of gdm.conf like this:
0=Standard
1=Dualhead

And then define two server sections:
[server-Standard]
name=Default X Server
command=/usr/X11R6/bin/X -audit 0    <-- No layout option, default layout is 
defined in XF86Config

[server--Dualhead]
name=X Server with dual head
command=/usr/X11R6/bin/X -audit 0 -layout "Dualhead"

I added these lines to my gdm.conf, but the result is not really what I was 
looking for. Now I have two X servers running (vt7 and vt8), one of them with 
the dual head layout. Each runs the GDM greeter. After I log into on of the 
servers, the other remains in memory (still claiming a significant portion of 
it). And since I will never use that second X server (this is a laptop, not a 
server) I'd say this setup is not so useful for me.

I have read the relevant parts of the GDM documentation regarding multiple 
servers and all. But I have to admit I am at a loss figuring out how I can 
tell GDM to run the standard server on startup, but to use another defined 
server if the user requests it (at login) 

I understand that GDM starts both of my server definitions because they are 
considered to be local static servers. So I added a flexible=true to the dual 
head server definitions and removed the 1=Dualhead line. Now there's only one 
server when GDM starts (the standard server), but I can only switch to the 
dual head server if I run gdmflexiserver (after I have already logged into 
the standard server, making this a second login).

Does GDM offer a functionality like gdmflexiserver from the standard server 
login screen? 

Torben

>
> > What would you add to gdm.conf? The PostLogin script I have written
> > already includes a check if the selected server layout is actually
> > defined in XF86Config.
>
> Hmmm, probably not very portable to check just against one Xserver.  That's
> why it might be better for the sysadmin to specify the available ones in
> the gdm.conf file.
>
> To add an option to gdm.conf, you simply add the key=value pair to the
> right section.  You'll notice in gdmlogin.c how GDM handles these config
> options.  Search for "GdmHalt" for an example.
>
> >>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.
> >
> > Nice to hear that the maintainer of GDM thinks that this is a useful
> > feature. :-) I'll see what I can do.
>
> Brian

-- 
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]