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




Torben:

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.

Right.  What you want to be able to do is to define a [server-Standard] and
a [server-foo].  Perhaps the "0=Standard" is a good default for display
0, but sometimes you want to log in with foo on 0.  GDM doesn't currently
support doing this.  But you could make it work by doing the following:

You still need to populate your menu, reading the gdm.conf file and
looking for [server-foo] blocks and display those in the menu.  Then the
user can pick server-foo to tell GDM that they really want to use server-foo
instead of server-Standard.  Does this make sense?  You can see how to
read in these [server-foo] sections by looking at the
xservers_get_server_definitions() function in gdmsetup.c to populate the
menu.  As I mentioned in my previous email, you can use the same technique
to pass the server name back to the GDM daemon that it uses for Session
and Language info (grep for GDM_SESS or GDM_LANG) in the daemon and
gui code to see how this works.  Then the daemon needs to make use of
this when launching the Xserver, so if the user requested a different
one, the right command gets used instead of the default.

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)

It currently doesn't support it.  I'm trying to help you understand how
it could be implemented.

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?

No, but it would not be much work to add this functionality.  I've explained
quite a bit to get you started, but if you need more help I'm happy to
explain further.

Brian



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