Configures various Firefox configuration files.
- Windows โ
- macOS โ
- Linux - Not supported this time. Does not seem challenging to support, just need to locate the firefox configuration directory on different flavors of linux.
Just include firefox_configuration
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[firefox_configuration]"
]
}
Tells this cookbook where to look for Firefox.
Default Value:
- Windows:
C:/Program Files/Mozilla Firefox/
- macOS:
/Applications/Firefox.app/Contents/Resources/
- Linux: @todo: Figure out install dir for different flavors of linux. Could use some help here ๐
Ruby usage:
node['firefox_configuration']['install_directory'] = "D:/Firefox/"
JSON usage:
{
"firefox_configuration": {
"install_directory": "D:/Firefox/"
}
}
Sets the EnableProfileMigrator
in the override.ini
file that disables the initial profile migrator.
Default Value: "true"
Ruby usage:
node['firefox_configuration']['enable_profile_migrator'] = "false"
JSON usage:
{
"firefox_configuration": {
"enable_profile_migrator": "false"
}
}
This preference determines what types of builds auto-updates will look for. This manages the channel-prefs.js
file.
Default Value: "release"
Possible Values:
- "release" - All final releases.
- "esr" - Special release channel for extended support releases.
- "beta" - Betas / release candidates (up to Gecko 2.0 also final releases).
- "aurora" - Pre-beta
- "nightly" - All nightly builds.
- "default" - No updates are offered.
Ruby usage:
node['firefox_configuration']['app_update_channel'] = "esr"
JSON usage:
{
"firefox_configuration": {
"app_update_channel": "esr"
}
}
More info:
Sets the preference as if a user had set it, every time you start the browser. So users can make changes, but they will be erased on restart. If you set a particular preference this way, it shows up in about:config as "user set". These settings are set in the mozilla.cfg file. Any valid firefox preference string can be a member of the hash.
Ruby usage:
node['firefox_configuration']['prefs'] = [
"browser.shell.checkDefaultBrowser" => false,
"browser.startup.homepage_override.mstone" => "ignore",
"browser.rights.3.shown" => true,
"toolkit.telemetry.prompted" => true
]
JSON usage:
{
"firefox_configuration": {
"prefs": {
"browser.shell.checkDefaultBrowser": false,
"browser.startup.homepage_override.mstone": "ignore",
"browser.rights.3.shown": true,
"toolkit.telemetry.prompted": true
}
}
}
More info:
Is used to alter the default value, though users can set it normally and their changes will be saved between sessions. If preferences are reset to default through the GUI or some other method, this is what they will go back to. Appears in about:config as "default". These settings are set in the mozilla.cfg file. Any valid firefox preference string can be a member of the hash.
Ruby usage:
node['firefox_configuration']['default_prefs'] = [
"browser.startup.homepage" => "data:text/plain,browser.startup.homepage=https://www.google.com"
]
JSON usage:
{
"firefox_configuration": {
"default_prefs": {
"browser.startup.homepage": "data:text/plain,browser.startup.homepage=https://www.google.com"
}
}
}
More info:
Is used to lock preferences so they cannot be changed through the GUI or about:config. In many cases the GUI will change to reflect this, graying out or removing options. Appears in about:config as "locked". Some config items require lockPref to be set, such as app.update.enabled. It will not work if it set with just pref. These settings are set in the mozilla.cfg file. Any valid firefox preference string can be a member of the hash.
Ruby usage:
node['firefox_configuration']['lock_prefs'] = [
"app.update.enabled" => false,
"app.update.auto" => false,
"app.update.mode" => 0,
"app.update.service.enabled" => false,
"datareporting.policy.dataSubmissionEnabled" => false,
"datareporting.healthreport.service.enabled" => false,
"toolkit.crashreporter.enabled" => false
]
JSON usage:
{
"firefox_configuration": {
"lock_prefs": {
"app.update.enabled": false,
"app.update.auto": false,
"app.update.mode": 0,
"app.update.service.enabled": false,
"datareporting.policy.dataSubmissionEnabled": false,
"datareporting.healthreport.service.enabled": false,
"toolkit.crashreporter.enabled": false
}
}
}
More info:
Can be used to "blank" certain preferences. This can be useful e.g. to disable functions that rely on comparing version numbers. These settings are set in the mozilla.cfg file. Any valid firefox preference string can be a member of the array.
Ruby usage:
node['firefox_configuration']['clear_prefs'] = [
"extensions.lastAppVersion",
"plugins.update.url"
]
JSON usage:
{
"firefox_configuration": {
"clear_prefs": [
"extensions.lastAppVersion",
"plugins.update.url"
]
}
}
More info:
CSS attributes that are applied to the userChrome.css
file. These will control visual elements within firefox.
Ruby usage:
node['firefox_configuration']['user_chrome_css'] = [
"#systemDefaultsGroup" => "display: none !important;",
"#updateApp" => "display: none !important;",
"#updateButton" => "display: none !important;"
]
JSON usage:
{
"firefox_configuration": {
"user_chrome_css": {
"#systemDefaultsGroup": "display: none !important;",
"#updateApp": "display: none !important;",
"#updateButton": "display: none !important;"
}
}
}
More info: