Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Hierdie gesprek is in die argief. Vra asseblief 'n nuwe vraag as jy hulp nodig het.

autoconfig file being parsed but not applied in firefox 100

  • 5 antwoorde
  • 1 het hierdie probleem
  • 2 views
  • Laaste antwoord deur jon.dickens

more options

Hi

  My firefox 97 autoconfig worked. In version 100, i had to remove some elements and replace some with the new settings. It is now parsed on load but does not lock anything per autoconfig. Any assistance would be appreciated.  File content is below:

// Firefox Default Settings -begin config file const {classes: Cc, interfaces: Ci, utils: Cu} = Components; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/FileUtils.jsm");

// Disable telemetry and health reporting lockPref("breakpad.reportURL", ""); lockPref("browser.tabs.crashReporting.sendReport", false); lockPref("datareporting.healthreport.infoURL", ""); lockPref("datareporting.healthreport.uploadEnabled", false); lockPref("datareporting.policy.dataSubmissionEnabled", false); lockPref("dom.ipc.plugins.flash.subprocess.crashreporter.enabled", false); lockPref("dom.ipc.plugins.reportCrashURL", false); lockPref("toolkit.telemetry.enabled", false);

//      Disable sync

lockPref("services.sync.addons.ignoreUserEnabledChanges", true); lockPref("identity.fxaccounts.commands.enabled", false); lockPref("identity.fxaccounts.enabled", false); lockPref("identity.fxaccounts.pairing.enabled", false); lockPref("identity.fxaccounts.toolbar.accessed", false); lockPref("identity.fxaccounts.toolbar.enabled", false); lockPref("identity.fxaccounts.auth.uri", ""); lockPref("services.sync.engine.addresses", false); lockPref("services.sync.engine.addons", false); lockPref("services.sync.engine.creditcards", false); lockPref("services.sync.engine.creditcards.available", false); lockPref("services.sync.engine.bookmarks", false); lockPref("services.sync.engine.history", false); lockPref("services.sync.engine.passwords", false); lockPref("services.sync.engine.prefs", false); lockPref("services.sync.engine.tabs", false); lockPref("services.sync.prefs.sync.dom.disable_open_during_load", false); lockPref("services.sync.prefs.sync.signon.generation.enabled", false);

// Turn on Do not Track lockPref("privacy.donottrackheader.enabled", true); lockPref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true);

// Disable certificate warning bypass // Enable support for Content Security Policy lockPref("security.csp.enableNavigateTo", false); // Disable Safe Browsing anti-malware // Safe Browsing communicates with a third party and leaks the browsing history and also sends metadata about the downloads made. // https://support.mozilla.org/en-US/kb/how-does-phishing-and-malware-protection-work lockPref("browser.safebrowsing.downloads.enabled", false); lockPref("browser.safebrowsing.malware.enabled", false);

// Turn on XSS Filter lockPref("browser.urlbar.filter.javascript", true);

// Restrict third party cookies lockPref("network.cookie.cookieBehavior", 1);

// Enable Flash as it's in a sandbox lockPref("plugin.state.flash", 2);

// Disable webcam and microphone unless necessary lockPref("media.navigator.enabled", false); lockPref("media.navigator.video.enabled", false);

//      Clear personal and temporary data on shutdown 

lockPref("privacy.clearOnShutdown.cache", true); lockPref("privacy.clearOnShutdown.cookies", true); lockPref("privacy.clearOnShutdown.downloads", true); lockPref("privacy.clearOnShutdown.formData", true); lockPref("privacy.clearOnShutdown.history", true); lockPref("privacy.clearOnShutdown.offlineApps", true); lockPref("privacy.clearOnShutdown.openWindows", false); lockPref("privacy.clearOnShutdown.sessions", true); lockPref("privacy.clearOnShutdown.siteSettings", true); lockPref("privacy.cpd.cache", true); lockPref("privacy.cpd.cookies", true); lockPref("privacy.cpd.downloads", true); lockPref("privacy.cpd.formdata", true); lockPref("privacy.cpd.history", true); lockPref("privacy.cpd.offlineApps", true); lockPref("privacy.cpd.openWindows", false); lockPref("privacy.cpd.passwords", true); lockPref("privacy.cpd.sessions", true); lockPref("privacy.cpd.siteSettings", true);

// Prevent saving passwords lockPref("signon.rememberSignons", false); lockPref("services.sync.prefs.sync.signon.rememberSignons", false); lockPref("signon.backup.enabled", false); lockPref("signon.rememberSignons.visibilityToggle", false);

// Set homepage to blank lockPref("browser.startup.homepage", "about:blank");

// set urlbar size - working lockPref("layout.css.devPixelsPerPx", "-1.2");

// Prevent the use of SPDY, Websockets and WebRTC if not supported by the web proxy // https://wiki.mozilla.org/Media/WebRTC lockPref("media.peerconnection.enabled", false);

// Disable UI buttons lockPref("pref.privacy.disable_button.cookie_exceptions",true); lockPref("browser.toolbars.bookmarks.showOtherBookmarks", false); lockPref("browser.migrate.showBookmarksToolbarAfterMigration", false); lockPref("browser.toolbars.bookmarks.visibility", "never"); lockPref("browser.urlbar.shortcuts.bookmarks", false);

// Disable updates and notifications lockPref("app.update.BITS.enabled", false); lockPref("app.update.service.enabled", false);

// Disable device sensors lockPref("device.sensors.enabled", false);

// Disable Pocket integration lockPref("browser.pocket.enabled", false); lockPref("extensions.pocket.enabled", false);

// Disable Firefox's new Screenshot tool (requires at least Firefox 55) // https://github.com/auberginehill/firefox-customization-files/issues/1 // https://www.ghacks.net/2017/08/12/how-to-disable-firefoxs-new-screenshot-tool/ lockPref("extensions.screenshots.disabled", true); // Disable the version updated page lockPref("browser.startup.homepage_override.mstone", "ignore"); // Disable default browser check lockPref("browser.shell.checkDefaultBrowser", false);

// Disable search suggestions // By default everything that is typed in the search box is sent to the search engine. lockPref("browser.search.suggest.enabled", false); lockPref("browser.search.suggest.enabled.private", false); lockPref("browser.urlbar.showSearchSuggestionsFirst", false); lockPref("services.sync.prefs.sync.browser.urlbar.showSearchSuggestionsFirst", false); lockPref("browser.urlbar.shortcuts.history", false); lockPref("browser.urlbar.suggest.bookmark", false); lockPref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts", false);

// Change default search engine to Google - others removed through Group Policy lockPref("browser.search.region", "US"); lockPref("browser.search.removeEngineInfobar.enabled", "True"); lockPref("browser.search.searchEnginesURL", "http://www.google.com/search?q=");

// New Tab settings lockPref("browser.newtab.preload", false); lockPref("browser.newtabpage.activity-stream.showSponsored", false); lockPref("browser.newtabpage.enabled", false);

// Turn on tracking protection // This makes Firefox block known tracking domains by default. lockPref("privacy.trackingprotection.enabled", true);

// [CHROME:userChrome.css - userContent.css][bug 1541233][69] lockPref("toolkit.legacyUserProfileCustomizations.stylesheets", true);

//////////////////////// thanks,

        jd
Hi My firefox 97 autoconfig worked. In version 100, i had to remove some elements and replace some with the new settings. It is now parsed on load but does not lock anything per autoconfig. Any assistance would be appreciated. File content is below: // Firefox Default Settings -begin config file const {classes: Cc, interfaces: Ci, utils: Cu} = Components; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/FileUtils.jsm"); // Disable telemetry and health reporting lockPref("breakpad.reportURL", ""); lockPref("browser.tabs.crashReporting.sendReport", false); lockPref("datareporting.healthreport.infoURL", ""); lockPref("datareporting.healthreport.uploadEnabled", false); lockPref("datareporting.policy.dataSubmissionEnabled", false); lockPref("dom.ipc.plugins.flash.subprocess.crashreporter.enabled", false); lockPref("dom.ipc.plugins.reportCrashURL", false); lockPref("toolkit.telemetry.enabled", false); // Disable sync lockPref("services.sync.addons.ignoreUserEnabledChanges", true); lockPref("identity.fxaccounts.commands.enabled", false); lockPref("identity.fxaccounts.enabled", false); lockPref("identity.fxaccounts.pairing.enabled", false); lockPref("identity.fxaccounts.toolbar.accessed", false); lockPref("identity.fxaccounts.toolbar.enabled", false); lockPref("identity.fxaccounts.auth.uri", ""); lockPref("services.sync.engine.addresses", false); lockPref("services.sync.engine.addons", false); lockPref("services.sync.engine.creditcards", false); lockPref("services.sync.engine.creditcards.available", false); lockPref("services.sync.engine.bookmarks", false); lockPref("services.sync.engine.history", false); lockPref("services.sync.engine.passwords", false); lockPref("services.sync.engine.prefs", false); lockPref("services.sync.engine.tabs", false); lockPref("services.sync.prefs.sync.dom.disable_open_during_load", false); lockPref("services.sync.prefs.sync.signon.generation.enabled", false); // Turn on Do not Track lockPref("privacy.donottrackheader.enabled", true); lockPref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true); // Disable certificate warning bypass // Enable support for Content Security Policy lockPref("security.csp.enableNavigateTo", false); // Disable Safe Browsing anti-malware // Safe Browsing communicates with a third party and leaks the browsing history and also sends metadata about the downloads made. // https://support.mozilla.org/en-US/kb/how-does-phishing-and-malware-protection-work lockPref("browser.safebrowsing.downloads.enabled", false); lockPref("browser.safebrowsing.malware.enabled", false); // Turn on XSS Filter lockPref("browser.urlbar.filter.javascript", true); // Restrict third party cookies lockPref("network.cookie.cookieBehavior", 1); // Enable Flash as it's in a sandbox lockPref("plugin.state.flash", 2); // Disable webcam and microphone unless necessary lockPref("media.navigator.enabled", false); lockPref("media.navigator.video.enabled", false); // Clear personal and temporary data on shutdown lockPref("privacy.clearOnShutdown.cache", true); lockPref("privacy.clearOnShutdown.cookies", true); lockPref("privacy.clearOnShutdown.downloads", true); lockPref("privacy.clearOnShutdown.formData", true); lockPref("privacy.clearOnShutdown.history", true); lockPref("privacy.clearOnShutdown.offlineApps", true); lockPref("privacy.clearOnShutdown.openWindows", false); lockPref("privacy.clearOnShutdown.sessions", true); lockPref("privacy.clearOnShutdown.siteSettings", true); lockPref("privacy.cpd.cache", true); lockPref("privacy.cpd.cookies", true); lockPref("privacy.cpd.downloads", true); lockPref("privacy.cpd.formdata", true); lockPref("privacy.cpd.history", true); lockPref("privacy.cpd.offlineApps", true); lockPref("privacy.cpd.openWindows", false); lockPref("privacy.cpd.passwords", true); lockPref("privacy.cpd.sessions", true); lockPref("privacy.cpd.siteSettings", true); // Prevent saving passwords lockPref("signon.rememberSignons", false); lockPref("services.sync.prefs.sync.signon.rememberSignons", false); lockPref("signon.backup.enabled", false); lockPref("signon.rememberSignons.visibilityToggle", false); // Set homepage to blank lockPref("browser.startup.homepage", "about:blank"); // set urlbar size - working lockPref("layout.css.devPixelsPerPx", "-1.2"); // Prevent the use of SPDY, Websockets and WebRTC if not supported by the web proxy // https://wiki.mozilla.org/Media/WebRTC lockPref("media.peerconnection.enabled", false); // Disable UI buttons lockPref("pref.privacy.disable_button.cookie_exceptions",true); lockPref("browser.toolbars.bookmarks.showOtherBookmarks", false); lockPref("browser.migrate.showBookmarksToolbarAfterMigration", false); lockPref("browser.toolbars.bookmarks.visibility", "never"); lockPref("browser.urlbar.shortcuts.bookmarks", false); // Disable updates and notifications lockPref("app.update.BITS.enabled", false); lockPref("app.update.service.enabled", false); // Disable device sensors lockPref("device.sensors.enabled", false); // Disable Pocket integration lockPref("browser.pocket.enabled", false); lockPref("extensions.pocket.enabled", false); // Disable Firefox's new Screenshot tool (requires at least Firefox 55) // https://github.com/auberginehill/firefox-customization-files/issues/1 // https://www.ghacks.net/2017/08/12/how-to-disable-firefoxs-new-screenshot-tool/ lockPref("extensions.screenshots.disabled", true); // Disable the version updated page lockPref("browser.startup.homepage_override.mstone", "ignore"); // Disable default browser check lockPref("browser.shell.checkDefaultBrowser", false); // Disable search suggestions // By default everything that is typed in the search box is sent to the search engine. lockPref("browser.search.suggest.enabled", false); lockPref("browser.search.suggest.enabled.private", false); lockPref("browser.urlbar.showSearchSuggestionsFirst", false); lockPref("services.sync.prefs.sync.browser.urlbar.showSearchSuggestionsFirst", false); lockPref("browser.urlbar.shortcuts.history", false); lockPref("browser.urlbar.suggest.bookmark", false); lockPref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts", false); // Change default search engine to Google - others removed through Group Policy lockPref("browser.search.region", "US"); lockPref("browser.search.removeEngineInfobar.enabled", "True"); lockPref("browser.search.searchEnginesURL", "http://www.google.com/search?q="); // New Tab settings lockPref("browser.newtab.preload", false); lockPref("browser.newtabpage.activity-stream.showSponsored", false); lockPref("browser.newtabpage.enabled", false); // Turn on tracking protection // This makes Firefox block known tracking domains by default. lockPref("privacy.trackingprotection.enabled", true); // [CHROME:userChrome.css - userContent.css][bug 1541233][69] lockPref("toolkit.legacyUserProfileCustomizations.stylesheets", true); //////////////////////// thanks, jd

All Replies (5)

more options

Are there errors reported in the Browser Console ?

Note that you need to disable the sandbox via the autoconfig.js file in the "defaults\pref" directory where the channel-prefs.js file is located.

//
pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false); // disable sandbox
  • autoconfig.cfg and autoconfig.js need to start with a comment line (//)
  • autoconfig.js needs to use Unix line endings (LF instead of CR/LF)

See also:

more options

Just to be sure, is there any reason adding these three lines at the top as only there presence needs the sandbox disabled and I'm not seeing special code in what you posted (i.e. I only see lockPref() calls) ?

const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FileUtils.jsm");

You can remove those three lines and leave the sandbox enabled.

Gewysig op deur cor-el

more options

Yes, i have code i am adding once the base config works to get the profile generated with the stylesheets. thx for great support. i am trying now...

var profileDir = Services.dirsvc.get("ProfD", Ci.nsIFile); var chromeDir = profileDir.clone(); chromeDir.append("chrome");

// If chrome folder isn't there, it's a new profile if (!chromeDir.exists()) {

 Cu.reportError("chrome folder not found");
 var defaultProfileDir = Services.dirsvc.get("GreD", Ci.nsIFile);
 defaultProfileDir.append("defaults");
 defaultProfileDir.append("profile");
 try {
   Cu.reportError("copying profile folder");
   copyDir(defaultProfileDir, profileDir);
 } catch (e) {
   Cu.reportError(e);
 }

}

function copyDir(aOriginal, aDestination) {

 var enumerator = aOriginal.directoryEntries;
 while (enumerator.hasMoreElements()) {
   var file = enumerator.getNext().QueryInterface(Ci.nsIFile);
   if (file.isDirectory()) {
     var subdir = aDestination.clone();
     subdir.append(file.leafName);
     try {
       subdir.create(Ci.nsIFile.DIRECTORY_TYPE, FileUtils.PERMS_DIRECTORY);
       copyDir(file, subdir);
     } catch (e) {
       Cu.reportError(e);
     }
   } else {
     try {
       file.copyTo(aDestination, null);
     } catch (e) {
       Cu.reportError(e);
     }
   }
 }

}

more options

That is the code I posted in this thread:

more options

thank you. very helpful in all regards.