Page 2 of 2

Re: Adding a homepage in Firefox

Published: September 22, 2016 - 5:32 PM
by the Challans Town Hall
Here is the content of our Mozilla.cfg file for those who are interested:
(Normally everything is explained for those who want to pick and choose options)

Code: Select all

// Désactive la mise à jour automatique
lockPref("app.update.enabled", false);
// pour être sûr que la mise à jour automatique soit désactivée
lockPref("app.update.auto", false);
lockPref("app.update.mode", 0);
lockPref("app.update.service.enabled", false);

// Désactive la vérification de la comptabilité des extensions
clearPref("extensions.lastAppVersion");

// Désactive l'affichage de 'Connaître vos droits' au premier lancement
pref("browser.rights.3.shown", true);

// Ne montre pas les nouvelles fonctionnalités à chaque mise à jour
pref("browser.startup.homepage_override.mstone","ignore");

// Modifie la page d'accueil
defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://www.google.fr");
pref("startup.homepage_welcome_url","http://www.google.fr");

// Désactive le lecteur de pdf interne
pref("pdfjs.disabled", true);

// Désactive le convertisseur flash vers javascript
pref("shumway.disabled", true);

// Ne demande pas d'installer le plugin flash
pref("plugins.notifyMissingFlash", false);

// Ne bloquer les extentions non à jour (flash...)
pref("extensions.blocklist.enabled", false);

// Désactive la vérification des plugins
lockPref("plugins.hide_infobar_for_outdated_plugin", true);
clearPref("plugins.update.url");

// Désactive le rapport de santé
lockPref("datareporting.healthreport.service.enabled", false);

// Disable all data upload (Telemetry and FHR)
lockPref("datareporting.policy.dataSubmissionEnabled", false);

// Désactive le rapport de crashs
lockPref("toolkit.crashreporter.enabled", false);
Components.classes["@mozilla.org/toolkit/crash-reporter;1"].getService(Components.interfaces.nsICrashReporter).submitReports = false;

// Désactivation de la télémétrie
pref("toolkit.telemetry.prompted",2);

// Désactivation de la vérification du navigateur par défaut
pref("browser.shell.checkDefaultBrowser", false);
//pref("general.smoothScroll", false);

// Configurer le proxy en detection automatique
pref("network.proxy.type",4);

// Désactivation de l'IPv6
pref("network.dns.disableIPv6",true);

// Désactivation des assistants de migration de profils
pref("profile.confirm_automigration",false);
pref("profile.migration_behavior",0);
pref("profile.migration_directory", "");

//-------------------------
//ajout Mairie de Challans

// Authoriser la contenu mixte
pref("security.mixed_content.block_active_content",false);
pref("security.mixed_content.block_display_content",false);

// Désactivation du téléchargement automatique
pref("browser.download.useDownloadDir",false)

// Titre des pages dans la barre de menu de la fenêtre
//pref("browser.tabs.drawInTitlebar",false)

// Désactiver la vérification des signatures des modules complémentaires
pref("xpinstall.signatures.required",false)

Re: Adding a homepage in Firefox

Published: September 29, 2016 - 12:35 PM
by fludo67
Hello,

Rather than redeploying Firefox, I would suggest creating a package to update the mozilla.cfg configuration file.
For example: package name: mozilla-settings-wapt
Package dependency (optional): firefox

Copy the mozilla.cfg file to the programfiles\mozilla firefox directory.
First, check for the presence of Firefox: if Firefox is not present, install the browser.

Re: Adding a homepage in Firefox

Published: October 12, 2016 - 5:29 PM
by Dylan
fludo67 wrote:Hello,

Rather than redeploying Firefox, I would be tempted in this case to create a package to update the mozilla.cfg configuration file.
For example: package name: mozilla-settings-wapt
Package dependency (optional): firefox

We copy the mozilla.cfg file to the programfiles\mozilla firefox directory.
We first check for the presence of Firefox: if Firefox is not present, it installs the browser
Good morning,

Well, I'm still stuck on my problem; I still can't figure out what's wrong. Can you tell me more about creating a package just for the update?
Thanks in advance.

Re: Adding a homepage in Firefox

Published: October 26, 2016 - 2:59 PM
by Ekouyoja
Dylan wrote: Hello,

Well, I'm still stuck on my problem, I still can't figure out what's wrong. Can you tell me more about creating a package just for the update?
Thanks in advance.
Create a package that copies and pastes your file into your Program Files directory, and add the Firefox package as a dependency. If you have questions about the syntax, refer to the provided documentation; otherwise, we can provide you with an example. :D

Re: Adding a homepage in Firefox

Published: November 3, 2016 - 11:18 AM
by Dylan
Ekouyoja wrote:
Create a package that copies and pastes your file into your Program Files directory, and add the Firefox package as a dependency. If you have questions about the syntax, refer to the provided documentation; otherwise, we can provide you with an example. :D
Hello and thank you

Actually, I really don't understand what the problem is. I'm happy to use your example, but I think there's an error every time I create a package...

Dylan

Re: Adding a homepage in Firefox

Published: November 3, 2016 - 4:05 PM
by Ekouyoja
Actually, what I told you is completely absurd because your base Firefox package already copies your mozilla.cfg file to Program Files with the following line: `
filecopyto("mozilla.cfg",makepath(programfiles32,"Mozilla Firefox"))`.

But nothing prevents you from creating a test package that does the same thing and see if it works (you never know, computers can be magical sometimes ^^).

Your setup.py file will look like this: `

from setuphelpers import *
uninstallkey = []
filecopyto("mozilla.cfg",makepath(programfiles32,"Mozilla Firefox"))`.

And your control file will look like this

: `package: mozz_cfg
version: 0.0.1-0
architecture: all
section: base
priority: optional
maintainer: nobody
description: Copy of mozilla.cfg`.

Well, I don't really believe it.
Now I think about it, the homepage might be defined in the agent profiles (something to look into).
Or, another thing to try that seems pretty good before even creating a new package is to modify your mozilla.cfg file like this:
//one to clear the preference
clearPref("browser.startup.homepage");
clearPref("startup.homepage_welcome_url");

or
//the other to lock the preference (the user cannot change it)
lockPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=https://www.google.fr");
lockPref("startup.homepage_welcome_url","http://www.google.fr");

Re: Adding a homepage in Firefox

Published: November 4, 2016 - 11:56 AM
by Dylan
Hello and thank you everyone!

It's finally working! Like an idiot, I only tested it on a test VM which was clearly faulty! That was the problem. I can now publish Firefox with the changes OK in mozilla.cfg. :D
All that's left is to see if there's a way to set Firefox as the default browser in the preferences. ;)