Is it possible to configure firefox from terminal?For example if i want to set toolkit.networkmanager.disable=true in about:config can i do it from terminal?


This setting should go into your Firefox profile prefs.js file, which should be located in ~/.mozilla/firefox/*.default/.

The file format is JavaScript, so in theory it could be mangled to the point of needing a JS parser to modify it, but Firefox is usually nice and prints each setting on its own line in alphabetical order. To add a setting like this you could simply

echo 'user_pref("toolkit.networkmanager.disable", true);' >> ~/.mozilla/firefox/**replace**.default/prefs.js

If this setting is already in the file, I'm not sure whether Firefox will register the last or first instance. Just give it a try. If it's not consistent, you could do this:

if grep 'toolkit.networkmanager.disable' ~/.mozilla/firefox/*.default/prefs.js
    sed -i -e 's/^user_pref("toolkit.networkmanager.disable", \(true\|false\));$/user_pref("toolkit.networkmanager.disable", true);/' ~/.mozilla/firefox/*.default/prefs.js
    echo 'user_pref("toolkit.networkmanager.disable", true);' >> ~/.mozilla/firefox/*.default/prefs.js

After modifying the configuration you'll need to restart Firefox to apply the change.

  • You've ninja'd me and I'm even happy you did as your answer is even better. +1 – Octavian A. Damiean Mar 30 '11 at 8:32
  • 1
    do we need to restart firefox after setting this ? – pkm Aug 5 '17 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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