Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465802 - www-client/firefox-bin should not force "use system colors" preference
Summary: www-client/firefox-bin should not force "use system colors" preference
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-13 15:10 UTC by grayhouse
Modified: 2014-03-29 21:42 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
packages.gentoo.org with system_colors on (system_colors.jpg,223.42 KB, image/jpeg)
2013-04-20 05:34 UTC, Franz Trischberger
Details
packages.gentoo.org with system_colors disabled (no_system_colors.jpg,249.71 KB, image/jpeg)
2013-04-20 05:35 UTC, Franz Trischberger
Details
Change all-gentoo.js to use defaultPref() instead of pref() for "use system colors" (allgentoo-colors-default.patch,558 bytes, patch)
2014-03-26 10:40 UTC, Nuno Silva
Details | Diff
Patch for new all-gentoo.js (all-gentoo-1.js.patch,584 bytes, patch)
2014-03-29 11:31 UTC, YeLee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description grayhouse 2013-04-13 15:10:23 UTC
firefox-bin-20.0 and later (at least on x86) forces the "use system colors" preference via the /opt/firefox/all-gentoo.js file.  At every restart of the application this file overrides the user preference set via the preferences dialog from the application GUI.  This behaviour seems rather unnecessary.
Comment 1 grayhouse 2013-04-13 15:18:07 UTC
OK, something weird.  I reverted to firefox-bin-17.0.5-r1, and now it is doing it too!  I never saw this problem before installing firefox-bin-20.0, so now I am confused.
Comment 2 grayhouse 2013-04-13 15:20:45 UTC
Spoke too soon ... firefox-bin-17.0.5-r1 seemed to be broken too, but after a couple of restarts it behaved as expected, preserving my preference to not use system colors.
Comment 3 grayhouse 2013-04-13 15:23:34 UTC
Arrrghh!!!  OK, so 17.0.5-r1 really is doing it too.  I am so confused about what is happening, and am going to just shut up now and wait for someone smart to come along.
Comment 4 Franz Trischberger 2013-04-20 05:34:26 UTC
Created attachment 346060 [details]
packages.gentoo.org with system_colors on

Screenshot that shows how this setting affects rendering with dark color schemes (kde -> Obsidian Cost): many parts are hard (if at all) to read.
But I think this is an error in firefox. User settings should be considered last.
Comment 5 Franz Trischberger 2013-04-20 05:35:07 UTC
Created attachment 346062 [details]
packages.gentoo.org with system_colors disabled
Comment 6 A.J. 2013-07-01 16:01:01 UTC
I can confirm this problem.  The setting is in /opt/firefox/all-gentoo.js and interferes with dark themes.  

pref("browser.display.use_system_colors",  true);

This overrides every other setting for this preference.  For a while I was manually changing it in preferences until I discovered the file.  On emerged updates to the package, I found I have to edit it again.

I learned about it via Mozilla support:  http://support.mozilla.org/en-US/questions/956231

It's actually a problem with Thunderbird as well.
Comment 7 Rick Farina (Zero_Chaos) gentoo-dev 2013-07-01 16:21:13 UTC
pref sets a default for the preference, you can always change it, it's not lockPref.
Comment 8 grayhouse 2013-07-01 16:34:28 UTC
Sure, you can change it, but the change does not persist.  Changing it every time you start the browser gets old fast.

Can someone explain why forcing this preference on everyone is considered desirable?
Comment 9 A.J. 2013-07-01 16:55:31 UTC
I agree, that's not an acceptable answer.  Until I changed the gentoo.js file, I had to change it every time I restarted the browser, and that was obnoxious.  I tried to override it in prefs.js in the profile but it is overridden by gentoo.js.

At the very least, gentoo.js should call a local config file that overrides this (if possible) and document it somewhere so people aren't left scratching their heads, with very little to go on besides one solution buried in Mozilla's support forums.
Comment 10 Rick Farina (Zero_Chaos) gentoo-dev 2013-07-01 17:28:29 UTC
> Can someone explain why forcing this preference on everyone is considered
> desirable?

The intent is to set the default, not to force the preference setting at every run.  If that's not what is happening then there is a bug here.
Comment 11 A.J. 2013-09-11 21:41:55 UTC
This continues to annoy me with Mozilla's frequent release cycles.  I've had to resolve this by putting CONFIG_PROTECT="/opt/firefox/all-gentoo.js in my make.conf file.
Comment 12 Ian Stakenvicius (RETIRED) gentoo-dev 2013-09-12 00:37:19 UTC
(In reply to A.J. from comment #11)
> This continues to annoy me with Mozilla's frequent release cycles.  I've had
> to resolve this by putting CONFIG_PROTECT="/opt/firefox/all-gentoo.js in my
> make.conf file.

why don't you just set the option in your user's prefs.js then?  

about:config
search
set to false
profit!
Comment 13 A.J. 2013-09-12 00:45:21 UTC
(In reply to Ian Stakenvicius from comment #12)
> why don't you just set the option in your user's prefs.js then?  
> 
> about:config
> search
> set to false
> profit!

I don't think you tried this.  prefs.js was one of the first things I tried to use to override it, and part of why I was annoyed at being forced to someone else's standards.

Just tested your steps several times.  No profit.  No soup for you.  No deal.

I believe this has to do with whereever all-gentoo.js is sourced that overrides any personal changes, and therefore is fully a bug.
Comment 14 grayhouse 2013-09-12 00:55:22 UTC
browser.display.use_system_colors that you set via about:config is just the same thing that the GUI button toggles.  It is, as stated in the OP and since, overwritten by the all-gentoo.js file at every restart.  The only cure is to remove it from all-gentoo.js .
Comment 15 Ian Stakenvicius (RETIRED) gentoo-dev 2013-09-12 01:55:24 UTC
hmm... yes.  i am thinking this must have to do with the way "general.config.file" gets handled.  i will try some experiments with moving settings from all-gentoo.js into defaults/pref/local-settings.js and see if that helps matters.
Comment 16 grayhouse 2013-11-30 17:02:19 UTC
24.1.1 is now stable ... still has same problem.
Comment 17 grayhouse 2014-02-15 21:55:36 UTC
24.3.0, still doing it.
Comment 18 Nuno Silva 2014-03-26 10:24:13 UTC
Several sources [1,2] refer that pref() explicitly overrides the user-set setting every time Firefox is started. defaultPref() is described as what sets a *default*. This is probably what is wanted at leat for this setting.
Comment 19 Nuno Silva 2014-03-26 10:36:37 UTC
Several sources [1,2] refer that pref() explicitly overrides the user-set setting every time Firefox is started. defaultPref() is described as what sets a *default*. This is probably what is wanted at least for this setting.

[1] https://support.mozilla.org/en-US/questions/956231
[2] http://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/
Comment 20 Nuno Silva 2014-03-26 10:40:42 UTC
Created attachment 373570 [details, diff]
Change all-gentoo.js to use defaultPref() instead of pref() for "use system colors"

This changes all-gentoo.js to set only the default value for browser.display.use_system_colors, instead of forcing the setting to "true" on startup.

It may be desired to evaluate if the same is needed for other settings.

Works at least with =www-client/firefox-bin-24.4.0. This still needs the setting to be changed *after* firefox-bin has been updated, but this time the setting will persist across firefox shutdowns.
Comment 21 Jory A. Pratt gentoo-dev 2014-03-29 03:05:50 UTC
28.0-r1 is in the tree. I have changed a few prefs to defaultPref along with adding additionally setting default dictionary path that can be changed by user as well.
Comment 22 YeLee 2014-03-29 11:31:25 UTC
Created attachment 373810 [details, diff]
Patch for new all-gentoo.js

(In reply to Jory A. Pratt from comment #21)
> 28.0-r1 is in the tree. I have changed a few prefs to defaultPref along with
> adding additionally setting default dictionary path that can be changed by
> user as well.

The new all-gentoo.js seems to have an unexpected ending, causing Firefox fails to start.
Comment 23 YeLee 2014-03-29 11:37:52 UTC
Comment on attachment 373810 [details, diff]
Patch for new all-gentoo.js

>--- a/portage/www-client/firefox-bin/files/all-gentoo-1.js
>+++ b/portage/www-client/firefox-bin/files/all-gentoo-1.js
>@@ -4,7 +4,7 @@
> lockPref("intl.locale.matchOS",                true);
> // Allow user to change based on needs
> defaultPref("browser.display.use_system_colors",  true);
>-defaultPref("spellchecker.dictionary_path", "/usr/share/myspell"
>+defaultPref("spellchecker.dictionary_path", "/usr/share/myspell");
> defaultPref("browser.shell.checkDefaultBrowser",  false); 
> // Preferences that should be reset every session
> pref("browser.EULA.override",              true);
Comment 24 vekin 2014-03-29 20:54:07 UTC
28.0-r1 is broken for me.  Browser will not start after update, deleted ~/.mozilla and it crashes just after the screen that asks you to import settings.
Comment 25 Jory A. Pratt gentoo-dev 2014-03-29 21:42:37 UTC
(In reply to vekin from comment #24)
> 28.0-r1 is broken for me.  Browser will not start after update, deleted
> ~/.mozilla and it crashes just after the screen that asks you to import
> settings.

This has already been fixed early this morning, resync and re-emerge firefox-bin and you will be fixed.