GNOME Bugzilla – Bug 450357
gdmsetup and configuration of xservers
Last modified: 2008-05-02 20:36:34 UTC
Please describe the problem: gdmsetup does not display (and hence doesn not allow creation and modification) of given xserver definitions (server-* sections) if they were not present in the [servers] configuration section when gdm started. E.g. if we only using server-Standard then this is the only server definition we can modify and this is the only server we can add to the list of servers to start as the other ones (Chooser, Terminal) are not present in the pull down combobox. Steps to reproduce: 1. Have one type of server defined in the config file (e.g. 0=Standard) 2. Start gdm and then run gdmsetup 3. Try to edit other types of server definitions (Chooser,Terminal) and/or try to add new server type Actual results: We can only modify/add Standard (or whicherver one was used) type of server Expected results: We should be able to modify/add all types of server definitions/servers present in the config files Does this happen every time? yes Other information: This is caused by the gdmsetup obtaining information from the daemon through the socket command. Unfortunately only active servers are loaded (and subsequently their definitions) hence the only choice we have is what was loaded by the daemon. This does not apply to the [servers] section as this section is loaded from the config file. Another by-product is that making changes to the server-* parameters does not update the daemon configuration (and it shouldn't as this would require daemon restart). So if we close gdmsetup and start it again (without re-starting the daemon) our changes will not show there but will be present in the custom.conf.
Yes, this does sound ugly. Not sure what the best way to fix this would be. Might be better to put this issue on hold and wait until William Jon McCann's rewrite of GDM is done, and see how to fix the problem there. Otherwise, we might have to fix this problem twice. I get the impression from William that he wants to rewrite GDM slaves so they interact with the configuration files directly which would avoid this problem completely. However, as I pointed out to William, there are some configuration keys that are shared between the daemon and the slaves, so having all programs access the configuration file directly would need some extra work to make sure that the different programs aren't accessing different values for such shared keys. Either way, fixing these issues will be a bit of work, I think. If we wanted to fix it in the existing GDM, I guess the daemon could keep track of the real settings and the latest updates to the config file, then gdmsetup could allow you to edit the version in the configuration file rather than what the daemon is using currently.
This is the way i tackled it: the xserver definitions are loaded from the config files rather than obtained from the daemon (in a similar fashion that [servers] section was and is processed). As the daemon does not update xserver information unless its restarted i think editing configuration file directly should be safe enough. Also when gdmsetup is running other config editing tools should not be used. is my reasoning correct?
This way we can edit custom server definitions (if the daemon can handle them tho is another thing). There is a bit of unused code that deals with adding and removing server definitions through gui. Most of the logic is there it would just have to be pieced together
This seems reasonable. It might be nice if gdmsetup did the following. If you change the settings, it should perhaps pop-up a dialog letting you know that you need to restart GDM or reboot for the changes to take effect when you click on the "Close" button. Also, I notice that when you run gdmsetup from a terminal it prints out a ton of DEBUG messages. I assume this is because debug is turned on by default? Perhaps we should only turn on if debug is turned on in the confiugration file?
> This seems reasonable. It might be nice if gdmsetup did the following... Actually that warning is already displayed in the Note section (and in rather small print) near the top of the X Server Login Window Preferences dialog >Also, I notice that when you run gdmsetup from a terminal it prints out a ... Yup i have noticed that as well. It would be great idea to switch it off by default and use CFLAGS env variable when debuging info is required.
> ... and use CFLAGS env variable ... mean user defined -g CFLAGS env variable
Fixed. * daemon/gdm-daemon-config.c: I noticed that the key "xservers/PARAMETERS" was not being processed in the gdm_daemon_config_update_key, so that if you change Xserver variables in gdmsetup, they weren't getting recognized by the daemon. I fixed this, and thus fixed bug #450357