COMPIZ_CONFIG_PROFILE is not actually the name of the profile that gets loaded

Bug #1085846 reported by Daniel van Vugt
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Compiz
New
Wishlist
Unassigned

Bug Description

$COMPIZ_CONFIG_PROFILE is ignored if you've changed the current profile in ccsm.

Steps to reproduce:
1. Run ccsm with environment COMPIZ_CONFIG_PROFILE=dev
2. Change CCSM > Preferences > Profile to "unity"
3. Restart compiz:
$ env DISPLAY=:0 LD_LIBRARY_PATH=./lib XDG_DATA_DIRS="./share:$XDG_DATA_DIRS" COMPIZ_CONFIG_PROFILE=dev ./bin/compiz --replace ccp
./bin/compiz (core) - Info: Loading plugin: core
./bin/compiz (core) - Info: Starting plugin: core
./bin/compiz (core) - Info: Loading plugin: ccp
./bin/compiz (core) - Info: Starting plugin: ccp
compizconfig - Info: Backend : gsettings
compizconfig - Info: Integration : true
compizconfig - Info: Profile : unity

Expected: "compizconfig - Info: Profile" should be "dev", the same as COMPIZ_CONFIG_PROFILE.
Observed: compizconfig - Info: Profile : unity

It seems the problem is compizconfig's dual-layer profiles. The value of COMPIZ_CONFIG_PROFILE is not really ever the profile name, but rather the name of a pointer to the profile name, stored in ~/.config/compiz-1/compizconfig/config

I think it's about time we stopped using this ini file as the top level of compizconfig. It's confusing to set COMPIZ_CONFIG_PROFILE=foo and then for ccp to load profile "bar".

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Of course, we have to be careful to support Ubuntu, which unfortunately uses COMPIZ_CONFIG_PROFILE=ubuntu and that loads a profile named "unity" for historical reasons.

summary: - $COMPIZ_CONFIG_PROFILE is ignored if you've changed the current profile
- in ccsm
+ COMPIZ_CONFIG_PROFILE is not actually the name of the profile that gets
+ loaded
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Questionable as to whether or not this is a bug?

As mentioned in the description - it works exactly the way it is supposed to, but it just overloads something that you don't expect. Having it at the top level is necessary though - we need to be able to have a way to tell compizconfig to use a particular backend and integration configuration along with the profile.

So I think the better change would be to rename the environment variable (eg COMPIZ_CONFIG_CONTEXT) and use COMPIZ_CONFIG_PROFILE to overload the actual profile

Changed in compiz:
importance: Undecided → Wishlist
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I know it's designed that way. But it's the design I am questioning.

I think it's too confusing for everyone to have a separate COMPIZ_CONFIG_CONTEXT and COMPIZ_CONFIG_PROFILE.

Best I can tell, the context (which is what COMPIZ_CONFIG_PROFILE really is right now) is the name of the entry to look up in .config/compiz-1/compizconfig/config. It seems to be designed that way so you don't need multiple variables for COMPIZ_CONFIG_BACKEND, COMPIZ_CONFIG_INTEGRATED, COMPIZ_CONFIG_PLUGIN_LIST_AUTOSORT etc.

But it could be simpler...

What if COMPIZ_CONFIG_PROFILE actually represented the profile and we paid attention to COMPIZ_CONFIG_BACKEND? Then you would have enough information to always find the profile data. Information like integration=false could be stored in the backend as part of the profile itself. Thus if both variables are set you can ignore and live without the ini file.

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Storing the integration value in the backend could make sense. The other one is plugin_list_autosort - and the same logic would apply there.

Changed in compiz:
milestone: 0.9.9.0 → 0.9.9.2
Changed in compiz:
milestone: 0.9.9.2 → 0.9.10.0
Changed in compiz:
milestone: 0.9.10.0 → 0.9.10.2
MC Return (mc-return)
Changed in compiz:
milestone: 0.9.10.2 → 0.9.11.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.