Although this is technically a blog, it's primary content is a series of articles on how to get Firefox working in a corporate Windows environment. Later ones build on earlier ones, so you might want to use the Table of Contents on the right to read through it chronologically instead of reading straight down from here.

Additional Useful Firefox Settings

Preventing Custom Extensions from Being Disabled

Newer versions of Firefox are trying to clean up unwanted extensions.  Anything that tries to install itself automatically will cause Firefox to prompt the user to make sure they really want it.  Great for consumers, bad for us when we're pushing out extensions centrally.  We don't want our users to disable something important, nor do we want to hassle them with a prompt they may not know how to respond to.  Fortunately we're also pushing out configurations via my script so we can disable this.  These are the settings you need to add to firefoxSettings:
var firefoxSettings = new Array
    "extensions.shownSelectionUI", true,
    "extensions.autoDisableScopes", 0
    );
The first one prevents the "Select Your Add-Ons" window that pops up the first time you use a more recent version of Firefox.  That asks the user if they really want to keep everything that's already installed, so we make it go away by marking it as already having been shown.  The second setting prevents Firefox from viewing extensions installed via the registry as suspicious and prompting the user about them, which is what we want since this is what we use to add our MSI extensions to Firefox.  With both these settings Firefox should continue to work quietly.


Preventing Other Unnecessary Prompts

These aren't strictly necessary, but for all their good intentions we just rather not have Firefox hassling our users with prompts.
var firefoxSettings = new Array(
    "toolkit.telemetry.prompted", 2,
    "toolkit.telemtry.rejected", true,
    "browser.rights.3.shown", true
    );
The first two prevent the "improve Firefox by sending anonymous information about performance etc." banner and says no.  The third prevents the "know your rights" banner.  Nothing malicious about either of these, we just want Firefox to be quiet and Just Work in a corporate environment.  You can leave them enabled if you wish.


Opening Local Files

So you have an intranet which has links to files on a share drive using the file: protocol, like file:///G:/Company Policy.doc.  Internet Explorer opens these files fine, but Firefox does nothing.  You could add your intranet to IE Tab if you wanted to, but there should be a way to make Firefox do this right?  No need to switch out browser engines unnecessarily right?  There is:
If you're using my script, add these three lines to firefoxSettings:
var firefoxSettings = new Array(
    "capability.policy.policynames", "localfilelinks",
    "capability.policy.localfilelinks.sites", "http://intranet",
    "capability.policy.localfilelinks.checkloaduri.enabled", "allAccess"
    );
Change http://intranet to your own URL.  localfilelinks.sites is a space separated list so you can have more than one if you need them.


Disabling the Built-In PDF Viewer

Firefox comes with a built-in PDF viewer starting with version 19.  If that works for you, great!  One less plug-in to worry about and one less attack vector.  However, if you need the full functionality of Adobe Reader you can disable it with this setting:
var firefoxSettings = new Array(
    "pdfjs.disabled", true
    );


Disabling the New Version Home Page

The first time you open Firefox after an update it opens a special home page.  Sometimes it's an About Firefox type page which you may want to suppress just to not bother the user, and sometimes it tells you Firefox is out of date which isn't something the user can do anything about.  This is also an issue because the Firefox MSIs can lag behind the official releases, so the newest one available to you is still considered old by the system.  This setting disables the special home page:
var firefoxSettings = new Array(
    "browser.startup.homepage_override.mstone", "ignore"
    );


Per-User or Per-Computer Settings

Sometimes you need to push out a particular setting per-user or per-computer.  For example, I turn off Firefox's smooth scrolling feature on our remote desktop server as it would cause too many unnecessary screen updates.  You can do it by adding code like this under the firefoxSetting variable in the login script:
if (computerName == "rdservername")
    {  firefoxSettings.push("general.smoothScroll", false);  }
You can also put userName instead of computerName.  The script was updated in July 2012 to provide the computerName variable, so if you have an older version you can just add this line to the top:
var computerName = network.ComputerName.toLowerCase();


Combining Multiple Settings

I hope it's obvious, but just in case it's not, when you're combining multiple settings from this blog you're not assigning a new array to firefoxSettings every time, you're merging them into one.  So to apply both the custom extensions settings and the local files settings, it would look like this:
var firefoxSettings = new Array(
    "extensions.shownSelectionUI", true,
    "extensions.autoDisableScopes", 0,
    "capability.policy.policynames", "localfilelinks",
    "capability.policy.localfilelinks.sites", "http://intranet",
    "capability.policy.localfilelinks.checkloaduri.enabled", "allAccess"
    );
There's an extra comma added after 0 to continue the list and then it goes straight into the second set of values.  If you had multiple "firefoxSettings = new Array(" statements the later ones would simply overwrite the earlier ones.

1 comment: