I need to run Firefox each time in a new profile directory with my extension enabled. What I do is the following:

  • Create temporary directory for storing profile (/tmp/profile.123)
  • Create extensions directory (/tmp/profile.123/extensions)
  • Create extension proxy as described here (/tmp/profile.123/extensions/myextension@my.domain)

My command line looks like this:

firefox -no-remote -profile /tmp/profile.123 -url http://www.google.com

The problem is that my extension starts disabled, and I'm forced to enable it manually and restart the Firefox. Is it possible to make it start enabled in first place?


Workaround I've found:

Create extensions.sqlite database file in the newly created profile folder. This file must contain my extension entry under the "addon" table.


It looks like workaround with modifying extensions.sqlite doesn't work anymore and such database doesn't exist. It was described here: http://research.zscaler.com/2012/09/how-to-install-silently-malicious.html

To enable extension automatically on first run, add following entry to the extensions.json located in newly create profile:

my example of extensions.json

  "schemaVersion": 16,
  "addons": [
      "id": "jid1-ZS4Xlocq0DBhdg@jetpack",
      "syncGUID": "1DNxcuq4WubL",
      "location": "app-profile",
      "version": "1.0",
      "type": "extension",
      "internalName": null,
      "updateURL": null,
      "updateKey": null,
      "optionsURL": null,
      "optionsType": null,
      "aboutURL": null,
      "iconURL": null,
      "icon64URL": null,
      "defaultLocale": {
        "name": "My cool extension name",
        "description": "Description",
        "creator": "hacker_1998",
        "homepageURL": null
      "visible": true,
      "active": true,
      "userDisabled": false,
      "appDisabled": false,
      "descriptor": "c:\\tmp\\firefox001\\extensions\\jid1-ZS4Xlocq0DBhdg@jetpack.xpi",
      "installDate": 1419414549006,
      "updateDate": 1419414549006,
      "applyBackgroundUpdates": 1,
      "bootstrap": true,
      "size": 54426,
      "sourceURI": null,
      "releaseNotesURI": null,
      "softDisabled": false,
      "foreignInstall": true,
      "hasBinaryComponents": false,
      "strictCompatibility": false,
      "locales": [

      "targetApplications": [
          "id": "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}",
          "minVersion": "26.0",
          "maxVersion": "30.0"
      "targetPlatforms": [

      "multiprocessCompatible": false

enter image description here

"active": true and "userDisabled": false are the keys to activate extension silently

The file extensions.json doesn't exist after "-CreateProfile" command, so you should create it manually.

Be careful with different versions of Firefox.


If you want to use extension immediately after first run of profile, prefs.js file should also contain something like: user_pref("extensions.bootstrappedAddons", "{\"CoolAddon@jetpack\":{\"version\":\"1.0\",\"type\":\"extension\",\"descriptor\":\"C:\\\\Users\\\\superuser\\\\AppData\\\\Roaming\\\\Mozilla\\\\Firefox\\\\Profiles\\\\7hkjishf.Default User\\\\extensions\\\\CoolAddon@jetpack.xpi\",\"multiprocessCompatible\":false}}");

Be aware of weird quotes escaping.

| improve this answer | |

No way to check it now for sure, but probably you have to play with extensions.enabledAddons (and/or extensions.enabledItems) in prefs.js file in the profile folder.

Something like:

user_pref("extensions.enabledAddons", "extId1:version,extId2:version");

| improve this answer | |
  • Already tried this, but it doesn't work. – Michael Spector Jan 1 '12 at 4:13

You have to edit the extensions.json file, just like Gleb said, but also the "user_pref("extensions.bootstrappedAddons", "{}");" entry in prefs.js. Try compare the difference of this entry by enabling and disabling extensions, you will find out what part to edit.

| improve this answer | |

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.