After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 450357 - gdmsetup and configuration of xservers
gdmsetup and configuration of xservers
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.19.x
Other All
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on: 404891
Blocks:
 
 
Reported: 2007-06-23 13:53 UTC by Lukasz Zalewski
Modified: 2008-05-02 20:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Lukasz Zalewski 2007-06-23 13:53:55 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.
Comment 1 Brian Cameron 2007-06-25 06:30:45 UTC
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.
Comment 2 Lukasz Zalewski 2007-06-25 11:27:27 UTC
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?
Comment 3 Lukasz Zalewski 2007-06-25 12:56:27 UTC
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 
Comment 4 Brian Cameron 2007-06-26 01:17:02 UTC
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?
Comment 5 Lukasz Zalewski 2007-06-26 16:51:29 UTC
> 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.
Comment 6 Lukasz Zalewski 2007-06-26 17:14:12 UTC
> ... and use CFLAGS env variable ...
mean user defined -g CFLAGS env variable
Comment 7 Brian Cameron 2008-05-02 20:36:34 UTC
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