Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there any such .conf file for Firefox to edit about:config?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

As Rinzwind already pointed out, the prefs.js file is what changes when you use about:config. It actually is a javascript file though, but it mostly just calls the user_pref() function many times (for me it’s over 100).

If you’re looking to make changes to Firefox configuration though it generally works better to create a user.js file in the same location as prefs.js. On startup, Firefox first runs prefs.js to load those settings, then runs user.js. Once you exit, the settings from user.js are also saved in prefs.js. Firefox doesn’t write to user.js so you won’t lose your settings, and it’ll be easy to manage just a few lines of settings there instead of being mixed in with everything else in prefs.js.

share|improve this answer
    
Can you give me an example of an about:config string in prefs.js or user.js? And is there any variable I can use in this files? I want to use a variable in a string that represents the Firefox version in use. –  Oxwivi May 7 '11 at 5:52
    
I haven’t tried using variables, but here’s an example line I have in my user.js from back when I tried out spell check in single-line input fields (includes a comment at the end, which is optional): user_pref("layout.spellcheckDefault", 1); // set to 2 to spellcheck in single-line inputs, 1 for normal –  misterhaan May 9 '11 at 18:30
    
What was the about:config line? I want to know which part goes where. –  Oxwivi May 9 '11 at 18:47
    
layout.spellcheckDefault shows in the Preference Name column, and 1 shows in the Value column. Since 1 is actually the default here, the Status shows default and not user set. The Type column is to help you know what sort of values you can set. For example a string value would need the value in quotes. If you’re not sure what to put in user.js you can make the change in about:config and then search for the Preference Name in prefs.js after exiting Firefox. –  misterhaan May 9 '11 at 19:01

Have a look iin your ~/.mozilla/ directory for a prefs.js. It is a plain text file (and not javascript). More info about pref.js on the mozilla site

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.