I want to configure firefox 14.0.1 with default settings for all my users using a file mozilla.cfg But the command defaultPref () is not valid. I use pref () but then the user can not change the parameters
With Thunderbird 14.0, I have no problem, the command defautPref () can be used
Solved! Go to Solution.
Are there any errors in the error console?
Does it work if you leave out the space: defaultPref()?
You can use these functions in mozilla.cfg:
defaultPref(); // set new default value pref(); // set pref, but allow changes in current session lockPref(); // lock pref, disallow changes
Excuse me but I made a typo in my post
It should be defautPref() and pref()
When I create a mozilla.cfg with:
// Mozilla Preferences
Firefox doesn't take these preferences
but when I write:
// Mozilla Preferences
Firefox takes these preferences but the user can't change the startup homepage afterwards
Works for me.
Note that the default only works if the pref hasn't been user set (i.e. isn't bold on the about:config page).
In that case you need to reset the pref via the right-click context menu to the default to give it the new value or remove the corresponding lines from the prefs.js file and a possible user.js file.
I have the problem with all new profile defined on my windows 7
By default, the new profile has no "mozilla" folder in c:\users\username\appdata\roaming and c:\users\username\appdata\local
I have the same problem with Ubuntu 12.04 LTS and firefox 14.0.1
i see https://bugzilla.mozilla.org/show_bug.cgi?id=45116
Perhaps i have an error in the content of mozilla.cfg but i don't see where
Are you sure that the prefs.js file doesn't yet have one or more of those lines?
Like, I posted above as soon as a pref is user set then defaultPref() doesn't have any effect. It only define the default to use if the pref doesn't exist or if you reset the pref or its corresponding setting to the default.
You can use this button to go to the Firefox profile folder if you can't locate it:
new windows, new username, new profile
When you start firefox for the first time, it creates a mozilla folder with parameters that you are defined in c:\Program files (x86)\Mozilla firefox\mozilla.cfg
Reminder, i don't have the problem with thunderbird only with firefox
I have the same problem. The defaultPref command is being processed (because I get error messages if, for example, I try to set a boolean preference with a string value) but the changes do not take effect.
The about:config page shows the preferences with status "default" and the original default value, not the default value I've set.
You have to make sure to initialize prefs with the correct data type to avoid problems.
I am initializing prefs with the correct data type, and no exception is being thrown. It just doesn't *do* anything.
I can reproduce this with a very simple mozilla.cfg:
(The extra blank line isn't in my file, I just don't know how to make it appear properly here.)