I have firefox installed system-wide for all our users. Unfortunately the Adobe Reader Plug-in is rather flakey and doesn't work some of the time. As a result I want to disable the plug-in by default for all our users, but still allow them to enable it if they want via the standard Tools->Add-ons->Plug-ins menu option. How can I have this plug-ins enabled/disabled status be disabled by default?
I've been able to configure system-wide configurations before by setting preferences in the mozilla root folder file defaults/pref/all.js, but enabled/disabled plugins doesn't appear to be configured in the preferences.
#define NS_PLUGIN_FLAG_ENABLED 0x0001 // is this plugin enabled?
#define NS_PLUGIN_FLAG_OLDSCHOOL 0x0002 // is this a pre-xpcom plugin?
But is there a way to add this to the defaults so that that NS_PLUGIN_FLAG_ENABLED is removed by default?
The plugins' settings are now integrated partially in about:config as of Firefox 22, and fully in 23+. The key names are plugin.state.* where * denotes the internal naming scheme used by Firefox for the discovered plugins. The values (integer) are 0 for disabled (Never Activate in Firefox Tools (Alt + T) > Add-ons > Plugins), 1 for click-to-play (Ask to Activate), and 2 for enabled (Always Activate). Firefox 22 has 0 and 2, and 23+ includes all the three states. The state Ask to Activate (1) is triggered after toggling plugins.click_to_play to true in about:config.
One way to get the correct names used by Firefox is from a reference/IT PC. Toggle the default states of all the discovered plugins (Firefox Tools (Alt + T) > Add-ons > Plugins) once, to reveal the corresponding plugin.state.* keys in about:config.
Using the lock (policy) file, defaultPref() or pref() can be used to set an initial preference i.e. nonmandatory - users may later change the initially set state of the plugin -, while lockPref() can be used to set a policy i.e mandatory - users cannot change the state.
e.g. defaultPref("plugin.state.flash", 0); to set an initial disabled state for the Flash plugin which users may change, or lockPref("plugin.state.flash", 0); to lock the state.
Enforce “click-to-play” in Chrome and Firefox domain-wide?