Re: Different config options for different X servers?




Brian,

Thanks for the response.

Perhaps I am missing the point, but I don't see how your message relates to my query.

My problem was wanting different *gdm2* configurations for different xservers. To make it concrete, let's say I want some of my displays to have one value for HaltCommand and others to have another value, although in fact there are many other configuration options, particularly in [greeter] and [gui], which I might want to be different on different displays.

Your message seemed to talk about different *xserver* configurations. I am already doing this: in my [servers] section I have things like:

 0=Standard
 10=VNC
 11=VNC
 12=VNC

and I define a [server-VNC] section later in the file. This all works fine. But as far as I can see it only allows me to specify xserver configuration separately, not general options such as HaltCommand, GtkTheme etc. Have I misunderstood you?

The solution I initially suggested, which is a bit of a hack, is to allow some xservers to be defined as 'remote' even if they are not via XDMCP, and then make use of the gdm2's existing capability to set different values for some setttings for "remote" servers (e.g. Welcome and RemoteWelcome). Basically this would mean not passing the GDM_IS_LOCAL environment variable to the greeter for some servers even though the gdm daemon does think of that server as local (rather than XMCP). This is a bit of hack, although perhaps a useful one given the existance of X servers like VNC which do to all intents and purposes provide "remote" access but which gdm considers local.

A better solution to the problem would be to allow gdm.conf to contain server-specific versions of each of its configuration sections. So as well as a global [security] section, there could optionally be a [security-foo] section which can override default settings in [security] but which only applies to the particular server "foo" (i.e. the server defined in a [server-foo] section.

Having had a quick look through the source just now, I begin to get an idea how this could be implemented. A few options which the gdm daemon processes (and which it makes sense to have defined per server) would have be to read later than they are now, once the server definitions have been parsed. But most of the per-server options are in the parts of the config file which are used by the greeter. gdm (the daemon) could pass an environment variable to the greeter specifying the name of the server on which it is appearing (e.g. "Standard", "foo",...), and gdmlogin could check for <section>-<servername>/<key> for each key it reads from the config file before checking <section>/<key>. Does this sound reasonable? It would allow any configuration option which gdmgreeter reads to be configurable either globally (applying to all servers) or per server type.

In your message you talked about people wanting a menu to select the xserver config. This seems to me to be a different feature entirely.

Although it's unlikely I would get around to working on this any time soon, I'd be interested to what you would think, in priciple, about allowing per-server versions of each of the config file sections (e.g. [gui-Standard], [gui-foo], [gui-VNC], etc).

Cheers

Seb

Brian wrote:
Seb wrote:
I use gdm to start several local, 'static' X servers. One is an ordinary X.Org server. The others are Xvnc servers. In reality these provide remote access (since a remote VNC client of some kind connects to them), although gdm thinks of them as local X servers because they are not via XDMCP.

I'd like to be able to specify different settings for some gdm options for these two classes of server. For example, I want Reboot and Shutdown buttons enabled on the local X.Org display, but not on the VNC displays.

Is there any way I can do this?

The gdm.conf file does let you specify multiple server configurations,
but each one is assigned a different DISPLAY value.  So, if you can set
up your machine to use different displays (via virtual tty's), then this
might work for you.

Since gdm already has sensible and/or separately configurable behaviour for what it thinks of as "remote" logins (i.e. XDMCP), the neatest solution would be to be able to specify in an X server definition that gdm should consider it to be a "remote" login even if it is not via XDMCP.

There have been a number of users who have requested that gdm2 support a
new feature that allows the user to pick the xserver configuration via a
menu in the login program.  This way if you set up an alternative xserver
config, it would simply appear in a new menu where you could select it.
Aside from adding the code to add the menu, this would also require a minor
change to make use of the selection when starting up the Xserver.

If you wanted to work on patching the code to support this sort of feature,
I'd be happy to help you understand the code.

Another option I pondered was running two instances of gdm. I'm guessing that would get a bit problematic though since gdm integrates so closely with the system.

Never tried this.  Does sound hacky.  You might be able to get it to work
if you install gdm2 to different locations.  Though you would probably
have difficulty getting them to share the same DISPLAY's.

Any thoughts? I think the ability to define a seemingly-local server as remote would be a useful feature, and perfect for VNC servers.

I think the best option would be to allow user's to pick the Xserver
config in the menu.  This would need to be a non-default feature, but
a flag could be added to the gdm.conf to turn on the menu for this.

--

Brian





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