Skip to content
  • Brian Cameron's avatar
    After two months, the redesign of GDM's internal configuration is finally · 2cfd51d2
    Brian Cameron authored
    2005-12-21  Brian Cameron  <brian.cameron@sun.com>
    
            After two months, the redesign of GDM's internal configuration is
            finally reaching a close.  Now GDM users are instructed to not modify
            the gdm.conf file directly and instead put any cutomizations in a
            separate file called gdm.conf-custom (read the comments in both files).
            gdmsetup now modifies the gdm.conf-custom file.  The GDM daemon will
            now use values in gdm.conf-custom first and the default values in
            gdm.conf if no value is defined in gdm.conf-custom.  Benefits:
    
            1) Now GDM truly supports system-wide and machine-specific config.
               System wide configuration is when the sysadmin wants to share the
               main gdm.conf file across multiple systems on a shared file system
               (possible by building GDM with the --with-configdir option or by
               running GDM with the --config option).  Specific systems can
               override defaults by modifying the gdm.conf-custom file.
            2) Distros can stomp the main gdm.conf file on upgrade knowing that any
               user changes are stored in a separate file.  For best backwards
               compatibility, distros will need to move the gdm.conf file to
               gdm.conf-custom if the gdm.conf file exists on the system but the
               gdm.conf-custom file does not.
            3) Making this work required a lot of cleanup in the way GDM manages
               its configuration files.  For example, now config options are
               managed via access functions, and do not depend on non-static
               globals being shared across files.  The GET_CONFIG and UPDATE_CONFIG
               commands work better and do not require special tweaking when adding
               new config options.  Vicious-extensions is now only included in a
               few files that need to know how to access the config files directly.
    
            This makes GDM support a popular feature in CDE which works similarly.
            (config files in /etc/dt/config take precidence over the ones in
            /usr/dt/config).
    
            * daemon/gdmconfig.[ch]: Now supports reading configuration values
              (including "servers" and "server-foo" sections from gdm.conf-custom
              and then from gdm.conf if not found in the custom file.  Now store
              translated strings in a separate hash since this improves
              performance.  Fix GET_SERVER_DETAILS so it works better and
              update config can now update server-foo sections via the
              "xservers/PARMAETERS" key.
            * gui/gdmsetup.c: Now only writes to the gdm.conf-custom file and isa
              smart enough to just delete the key if the value will be the same as
              in the gdm.conf file.  Fixed some core dumping issues caused by my
              change to make gdmsetup use the new gdmconfig functions for getting
              configuration data from the server.  This work cleaned up the code
              quite a bit.  Removed the "--config" option from gdmsetup since this
              change makes it edit the configuration of the running GDM daemon
              instead of a program that edits a particular configuration file.
            * daemon/gdm.h, doc/C/gdm.xml: Updated docs with info about how
              configuration works nwo.  Now sockets protocol info is the same
              in both documents.
            * daemon/gdm.c: Fix GET_SERVER_DETAILS to support "ID" and some
              cleanup.
            * gui/Makefile.am, daemon/Makefile.am: Support --with-configdir option
              which got broken.
            * config/gdm.conf.in: Updated comments to mention that this file is not
              to be edited. Cleaned up the file so it is more readible.
            * config/Makefile.am: Install gdm.conf-custom and move gdm.conf to
              gdm.conf-custom if it is modified and gdm.conf-custom is not already
              installed.  If it is changed and gdm.conf-custom already exists, move
              it to gdm.conf.org.
            * gui/gdmchooser.c, gui/gdmflexiserver.c: Remove unused getting of the
              configuration file.
            * gui/gdmconfig.[ch]: Add function to tell config to never_cache, which
              is needed by gdmsetup.
            * config/gdm.conf-custom: Added template file.
    2cfd51d2