default settings not taken into accounts

Bug #676958 reported by Didier Roche on 2010-11-18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libcompizconfig (Ubuntu)

Bug Description

The default compiz settings are set in /etc/compizconfig/config.

But in the code (src/config.c), the global file is only read in ccsReadConfig if there is no "iniFile" (called by getConfigFile). The thing is that getConfigFile is calling ccsIniOpen which creates the file! so the global file is never read.

Ok, we can thing that replacing that by:

    char *localConfigFileName = NULL;
    FILE *fp;

    /* check if the local config file exists instead of relying in the iniFile
       and getConfigFile will always return one (eventually created by
       ccsIniOpen) */
    printf ("Time for the global config file\n");
    localConfigFileName = getConfigFileName();
    fp = fopen (localConfigFileName, "r");
    free (localConfigFileName);
    if (!fp)
        return ccsReadGlobalConfig (option, value);
    fclose (fp);

    printf ("read local config file\n");
    iniFile = getConfigFile();

can work… but unfortunately, ccsReadConfig is called multiple times at initialisation and it seems that the old config is just scratched.
Pretty easy to reproduce, under gnome, check that you have a global compiz config file with backend=gconf under GNOME.
Then, remove/rename ~/.config/compiz-1/

Start compiz: you will get: Backend : ini

It seems that it can't find on first load the global file. let me see…

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libcompizconfig -

libcompizconfig ( natty; urgency=low

  * debian/patches/01_get_global_config.patch:
    - don't ignore global configuration file because of invalid path
      (LP: #676958)
  * debian/compizconfig/config, debian/libcompizconfig0.install:
    - ship rather upstream file.
  * add debian/patches/series (wasn't present in the transition)
  * removed debian/patches/04_fix_ini_fallback.patch as it's dealt upstream
 -- Didier Roche <email address hidden> Thu, 18 Nov 2010 14:29:28 +0100

Changed in libcompizconfig (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers