Add homepage in Firefox

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
User avatar
Challans Town Hall
Messages: 15
Registered: July 7, 2014 - 3:52 PM

September 22, 2016 - 5:32 PM

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)
fludo67
Messages: 21
Registration: Sep 13, 2016 - 2:23 p.m.

September 29, 2016 - 12:35

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.
Dylan
Messages: 20
Registration: June 9, 2016 - 10:28

October 12, 2016 - 5:29 PM

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.
Ekouyoja
Messages: 18
Registration: July 18, 2016 - 10:35

October 26, 2016 - 2:59 PM

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
Dylan
Messages: 20
Registration: June 9, 2016 - 10:28

November 3, 2016 - 11:18

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
Ekouyoja
Messages: 18
Registration: July 18, 2016 - 10:35

November 3, 2016 - 4:05 PM

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");
Dylan
Messages: 20
Registration: June 9, 2016 - 10:28

November 4, 2016 - 11:56

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. ;)
Locked