# SLED11: define and enforce Firefox configuration

**URL:** <https://forums.suse.com/t/sled11-define-and-enforce-firefox-configuration/27537>\
**Category:** SLED Applications\
**Created:** [October 19, 2015, 7:08pm UTC](https://forums.suse.com/t/sled11-define-and-enforce-firefox-configuration/27537 "2015-10-19T19:08:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![System1](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@System1](https://forums.suse.com/u/System1)\
**Post date:** [October 19, 2015, 7:08pm UTC](https://forums.suse.com/t/sled11-define-and-enforce-firefox-configuration/27537/1 "2015-10-19T19:08:25Z")

</div>

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](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/](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… 🙂

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](http://mozillazine.org)?

GÃ¼nther

---

<div class="post-metadata">

**Author:** ![mikewillis](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mikewillis](https://forums.suse.com/u/mikewillis)\
**Post date:** [October 19, 2015, 10:30pm UTC](https://forums.suse.com/t/sled11-define-and-enforce-firefox-configuration/27537/2 "2015-10-19T22:30:01Z")

</div>

[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](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/](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… 🙂

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](http://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/](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).

---

<div class="post-metadata">

**Author:** ![thsundel](https://avatars.discourse-cdn.com/v4/letter/t/13edae/32.png) [@thsundel](https://forums.suse.com/u/thsundel)\
**Post date:** [October 20, 2015, 10:24am UTC](https://forums.suse.com/t/sled11-define-and-enforce-firefox-configuration/27537/3 "2015-10-20T10:24:58Z")

</div>

[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](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/](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… 🙂

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](http://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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 20, 2015, 2:59pm UTC](https://forums.suse.com/t/sled11-define-and-enforce-firefox-configuration/27537/4 "2015-10-20T14:59:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [October 20, 2015, 3:00pm UTC](https://forums.suse.com/t/sled11-define-and-enforce-firefox-configuration/27537/5 "2015-10-20T15:00:18Z")

</div>

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/](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
