SLED11: define and enforce Firefox configuration

I am trying for enforce some configuration details with Firefox 31
(SLED11 SP3) and 38 (SLED11 SP4). More specifically I want to limit the
browser cache size and set a default value for the home page.

Following http://kb.mozillazine.org/Locking_preferences I created two
files within /usr/lib64/firefox/browser/defaults/preferences:

cat local-settings.js

pref(“general.config.obscure_value”, 0); // only needed if you do not
want to obscure the content with ROT-13
pref(“general.config.filename”, “mozilla.cfg”);

cat mozilla.cfg

//
lockPref(“browser.cache.disk.capacity”, 102400);
defaultPref(“browser.startup.homepage”, “http://www.example.com/”);

Both files share the 0.0 644 rights with the configuration files from
the SLED packages MozillaFirefox and MozillaFirefox-branding-SLED.

As a first result the browser will not start anymore:
Error message: “Failed to read the configuration file. Please contact
your system administrator.” That is me… :slight_smile:

Any ideas on how to make this work? Do I really have to rot-13 the files
as suggested by the old Wiki article from mozillazine.org?

Günther

[QUOTE==?ISO-8859-15?Q?G=FCnther_Schwarz?=;30005]I am trying for enforce some configuration details with Firefox 31
(SLED11 SP3) and 38 (SLED11 SP4). More specifically I want to limit the
browser cache size and set a default value for the home page.

Following http://kb.mozillazine.org/Locking_preferences I created two
files within /usr/lib64/firefox/browser/defaults/preferences:

cat local-settings.js

pref(“general.config.obscure_value”, 0); // only needed if you do not
want to obscure the content with ROT-13
pref(“general.config.filename”, “mozilla.cfg”);

cat mozilla.cfg

//
lockPref(“browser.cache.disk.capacity”, 102400);
defaultPref(“browser.startup.homepage”, “http://www.example.com/”);

Both files share the 0.0 644 rights with the configuration files from
the SLED packages MozillaFirefox and MozillaFirefox-branding-SLED.

As a first result the browser will not start anymore:
Error message: “Failed to read the configuration file. Please contact
your system administrator.” That is me… :slight_smile:

Any ideas on how to make this work? Do I really have to rot-13 the files
as suggested by the old Wiki article from mozillazine.org?

Günther[/QUOTE]

Take a look at this thing I wrote last year
https://www.suse.com/communities/conversations/setting-locking-firefox-preferences-sled/
Probably still works. I’ve not tried it with Firefox 38, I don’t actually use SLED any more, just happened to look at the forum out of curiosity. I worked some of it out by trial and error and swearing. I wrote it because I found the Moziila described method didn’t work, (I found it worked fine with a copy of Firefox downloaded from Mozilla though) and the method SUSE documentation minimally described ceased to work with Firefox 3 (and was eventually removed several years after it ceased to be accurate).

[QUOTE==?ISO-8859-15?Q?G=FCnther_Schwarz?=;30005]I am trying for enforce some configuration details with Firefox 31
(SLED11 SP3) and 38 (SLED11 SP4). More specifically I want to limit the
browser cache size and set a default value for the home page.

Following http://kb.mozillazine.org/Locking_preferences I created two
files within /usr/lib64/firefox/browser/defaults/preferences:

cat local-settings.js

pref(“general.config.obscure_value”, 0); // only needed if you do not
want to obscure the content with ROT-13
pref(“general.config.filename”, “mozilla.cfg”);

cat mozilla.cfg

//
lockPref(“browser.cache.disk.capacity”, 102400);
defaultPref(“browser.startup.homepage”, “http://www.example.com/”);

Both files share the 0.0 644 rights with the configuration files from
the SLED packages MozillaFirefox and MozillaFirefox-branding-SLED.

As a first result the browser will not start anymore:
Error message: “Failed to read the configuration file. Please contact
your system administrator.” That is me… :slight_smile:

Any ideas on how to make this work? Do I really have to rot-13 the files
as suggested by the old Wiki article from mozillazine.org?

Günther[/QUOTE]

On our Ubuntu systems I have it like this so the path might be different on SLE:

[/usr/lib/firefox/mozilla.cfg]
//Comment
lockPref(“browser.cache.disk.enable”, false);
lockPref(“browser.cache.disk.smart_size.enabled”, false);
lockPref(“browser.cache.disk_cache_ssl”, false);
lockPref(“browser.cache.disk.capacity”, 0);

[/usr/lib/firefox/browser/defaults/preferences/local-settings.js]
pref(“general.config.obscure_value”, 0);
pref(“general.config.filename”, “mozilla.cfg”);
pref(“browser.cache.disk.enable”, false);
pref(“browser.cache.disk.smart_size.enabled”, false);
pref(“browser.cache.disk_cache_ssl”, false);
pref(“browser.cache.disk.capacity”, 0);

I believe you need to put the mozilla.cfg in the same directory as the firefox binary and that is why it fails to read the configuration file.

Thomas

thsundel wrote:[color=blue]

I believe you need to put the mozilla.cfg in the same directory as the
firefox binary and that is why it fails to read the configuration file.[/color]

It is indeed the path for the configuration file with the locking
statements which has to be /usr/lib64/firefox/ on SUSE also.

Günther

mikewillis wrote:[color=blue]

Take a look at this thing I wrote last year
https://www.suse.com/communities/conversations/setting-locking-firefox-preferences-sled/
Probably still works. I’ve not tried it with Firefox 38, I don’t
actually use SLED any more, just happened to look at the forum out of
curiosity. I worked some of it out by trial and error and swearing. I
wrote it because I found the Moziila described method didn’t work, (I
found it worked fine with a copy of Firefox downloaded from Mozilla
though) and the method SUSE documentation minimally described ceased to
work with Firefox 3 (and was eventually removed several years after it
ceased to be accurate).[/color]

OK, great article, thank you very much for sharing this. The missing
piece of information for me was the location of my file with the locked
settings. Putting it in /usr/lib64/firefox/ instead of
/usr/lib64/firefox/browser/defaults/preferences as suggested in the
mozillazine article fixes my problems. It works now both with SP3 and
SP4 of SLED11.

I put a comment in the SUSE SLED11 Application Guide chapter 15.
Information about how to lock down Firefox as provided by SUSE is sadly
missing there. Customizing cache settings or the default home page are
frequent tasks on managed systems and most definitely should be covered
in the administrative manual.

Günther