# Custom Firefox Use Flags?

## FastTurtle

I've had lots of issues with some of the garbage the FF devs added such as Pocket, Sync and now Enhance Protection and I'm hoping to be able to strip them from my build. Don't care about the icon issue as that's just a cosmetic and I can screw folks up by using the Edge or even IE icon   :Laughing: 

I also prefer using the ESR version so any useflags need to indicate which version they're for.

----------

## Ionen

Firefox doesn't really have build-time switches to disable the majority of things, and when it does it's often broken because disabling gets no real testing / maintenance upstream. These also tend to be small'ish things (on a very big package), that still have a runtime config option to disable -- this is often seen as not worth having a USE if these options don't have extra dependencies.

But recall there was no option for disabling pocket/sync at build time either way, not that I checked closely in a while.

Gentoo does disable a few things at runtime by default though, like normandy.

----------

## FastTurtle

Dang!! I was hoping to be able to continue using Firefox but from the looks of things, they've gotten more and more bloat added to the blasted thing and then features such as Enhance Protection refuses to turn off. Looks as though I'll be dumping firefox in favor of Edge and my Ublock works with it.

----------

## figueroa

 *FastTurtle wrote:*   

> Dang!! I was hoping to be able to continue using Firefox but from the looks of things, they've gotten more and more bloat added to the blasted thing and then features such as Enhance Protection refuses to turn off. Looks as though I'll be dumping firefox in favor of Edge and my Ublock works with it.

 

You've got to be kidding. That was my initial reaction.

But, actually, I think you have outlined a desired solution rather than focusing on the problem. Are you having trouble with Ublock? I suggest you describe the problem you are having along with actual error messages (if any) and/or other meaningful manner of failure. I'm almost certain that there are other users here who are successfully doing what you are trying to accomplish, or who can suggest alternatives, or confirm the issues.

----------

## Juippisi

I used to patch pocket out when it was first introduced, the patches _were_ simple and available. Then pocket grew and it was becoming harder to find those patches, and if you did, they often broke so you had to manually go through the patches and patching process. Now Firefox's big enough to guarantee that process itself was hours work.

https://github.com/pyllyukko/user.js/ can completely disable pocket and is pretty simple to apply.

----------

## pjp

 *FastTurtle wrote:*   

> Looks as though I'll be dumping firefox in favor of Edge and my Ublock works with it.

  Is that the same type of limited ublock that will work with Chrome, or is Edge somehow different in that regard? What about MS snooping user data ("telemetry" if you prefer)? Before Edge, I thought IE was among the better browsers available. I didn't realize they were supporting LInux.

----------

## FastTurtle

Figueroa: Not kidding about using the Open Source version of Edge even though I prefer using Firefox ESL but the issue I'm having is that the "Enhanced Protection" Mode has defaulted to on even though it shouldn't be as I've been using a custom setup for the last 3 versions that only blocks cookies by default. The real annoyance is that for some reason, it no longer respects the disabling and resets itself every time I visit or even reload any site and getting support from the Mozilla Devs means "Sacrifice your first born lamb, read the entrails of a worm, toss Black Tea Leaves onto the wind and Beg Kali to Kill Baal" just to even get a ticket.  :Twisted Evil: 

pjp: Although Ublock appears to be a more limited version of Umatrix, it actually has the same feature set as Umatrix but to enable it, you need to go into the settings and enable "advanced mode", which then gives you the site by site list for blocking. Very useful.

----------

## pjp

That's not what I'm referring to. Google is changing to "manifest v3" in Chrome. That has significant impact on ublock (also stated by its creator). And while looking for a good reference, I see results indicating that Edge is adopting v3. And at least in 2020, there were suspicions of MS collecting data via Edge (I don't know if it was verified, but they collect it through their OS, so...).

----------

## figueroa

Open source with a grain of salt. Microsoft's doubletalk is that they use portions of the open source Chromium upon which to build it. The Gentoo source is a binary .deb. So, no.

----------

## Perfect Gentleman

Use pg_overlay.

----------

## technotorpedo

Going with another browser, each persons choice but imo, your loss. Firefox is by far the most configurable browser on the planet. Not only saying that cause I prefer FF, saying that because it's a fact. Switching to something else as a solution a person will likely just end up encountering a bunch of shortcomings or things they dislike on the next browser used only it won't be as easily reconfigured when using them.

Plus no doubt some things a user may find undesirable people like MS or Google Inc have a conflict of interest in even allowing users to have control of browser config's. Things like user tracking, data collection or etc. It simply goes against their best interests to make it easy or even possible for users to disable certain things. You'd need to provide more info as to the specific setting or issues you're having with Firefox's configuration, for anybody to be able to try and help out. Only 2 cents.  :Smile: 

----------

## technotorpedo

Oops @FastTurtle you did elaborate on the issue somewhat. Still not very clear to me what you're experiencing though. Would advise search for "keywords of the setting your having problems with" +about:config and things along those lines. Could very well lead to others having the same issue, not liking whatever decision Mozilla has made and asking about or sharing solution(s.)

Recently encountered a similar headache myself when upgrading to FF v 96. Firefox set the number of content processes to default of 8 and greyed out the controls to adjust it in the browsers settings too. Would not allow me to set the number of content processes below 3. Took some effort on my part but tracked it down to disabling a config option in about:config and now when I check Firefox is using the 2 CP's like I wanted. For myself that turned out being fission.autostart, I had to set that config to false. For you who knows but would be shocked if you can't find a better fix than abandoning Firefox.

Also while skimming the thread, noticed @pjp pointed out the same thing I did and it's totally true. That being MS and/or Google having other agenda's than the users of their respective web browser. Yeah it makes sense Edge is going with this manifest v3 thing Google came out with, Edge ..  just like Chrome is built off of Chromium. They're doing that cause they don't want to invest in doing things differently than what Google decides if possible. It would cost them money and also if it's good for Google, then it's probably better for MS too. 

For whichever reasons Google is opting for it. They both to a great extent share the same goals. Mentioned ... kind of goes without saying their goals and users goals and interests don't necessary align well. Not that I think Mozilla's outlooks are 100% noble either, yep ... big part of Firefox is they make A LOT of money from it and they know if they keep stripping out the things users enjoy, that they'll lose more of them, thus = less profit. So at least I think my and Mozilla's interests are better in sync. End of day, it's each persons choice regardless ...

----------

## guru meditation

The requirement to install node.js alone is a great nightmare. Thank God LTS version 91 does still accept --disable-nodejs.

For a starter, here is my mozconfig for FF91ESR. Some switches are taken over from the Librewolf project, some I pulled from the FF sourcecode.

Heaven knows the world would end if Mozilla would come down the throne and publish a list of all available switches and parameters. FF was once created because (1) Netscape suite was too blown-up, and (2) did not support “dynamic” web pages.

mozconfig:

```
ac_add_options --enable-application=browser

ac_add_options --disable-ffmpeg

ac_add_options --disable-webdriver

ac_add_options --disable-profile-generate

ac_add_options --disable-default-browser-agent

ac_add_options --disable-geckodriver

ac_add_options --disable-sandbox

ac_add_options --disable-coverage

ac_add_options --disable-mozsearch-plugin

ac_add_options --disable-smoosh

ac_add_options --allow-addon-sideload

ac_add_options --disable-alsa

ac_add_options --disable-artifact-builds

ac_add_options --disable-cargo-incremental

ac_add_options --disable-crashreporter

ac_add_options --disable-dbus

ac_add_options --disable-debug

ac_add_options --disable-debug-symbols

ac_add_options --disable-extensions

ac_add_options --disable-geckodriver

ac_add_options --disable-jack

ac_add_options --disable-necko-wifi

ac_add_options --disable-nodejs

ac_add_options --disable-pulseaudio

ac_add_options --disable-rust-simd

ac_add_options --disable-system-extension-dirs

ac_add_options --disable-tests

ac_add_options --disable-updater

ac_add_options --disable-webrtc

ac_add_options --disable-webspeech

ac_add_options --enable-default-toolkit=cairo-gtk3

ac_add_options --enable-hardening

ac_add_options --enable-install-strip

ac_add_options --enable-linker=bfd

ac_add_options --enable-optimize=-O2

ac_add_options --enable-release

ac_add_options --enable-rust-simd

ac_add_options --enable-strip

ac_add_options --enable-system-ffi

ac_add_options --enable-system-pixman

ac_add_options --host=x86_64-pc-linux-gnu

ac_add_options --libdir=/usr/lib64

ac_add_options --prefix=/usr

ac_add_options --prefix=/usr

ac_add_options --target=x86_64-pc-linux-gnu

ac_add_options --update-channel=nix

ac_add_options --with-intl-api

ac_add_options --without-ccache

ac_add_options --without-google-location-service-api-keyfile

ac_add_options --without-google-safebrowsing-api-keyfile

ac_add_options --without-mozilla-api-keyfile

ac_add_options --without-system-nspr

ac_add_options --with-system-icu

ac_add_options --with-system-jpeg

ac_add_options --with-system-libevent=/usr

ac_add_options --with-system-libvpx

ac_add_options --with-system-png

ac_add_options --with-system-webp

ac_add_options --with-system-zlib

ac_add_options --with-toolchain-prefix=x86_64-pc-linux-gnu-

ac_add_options --with-unsigned-addon-scopes=app,system

ac_add_options --x-includes=/usr/include

ac_add_options --x-libraries=/usr/lib64

ac_add_options --with-libclang-path=/usr/lib/llvm/13/lib64

export MOZ_REQUIRE_SIGNING=

mk_add_options  MOZ_PEERCONNECTION=0

mk_add_options MOZ_SRTP=

# Disables crash reporting, telemetry and other data gathering tools

mk_add_options MOZ_CRASHREPORTER=0

mk_add_options MOZ_DATA_REPORTING=0

mk_add_options MOZ_SERVICES_HEALTHREPORT=0

mk_add_options MOZ_TELEMETRY_REPORTING=0

```

I tried some other switches that I found in the souce code, but deleted them because mach complained that it didn't know them.

FF 91.5 is still compiling. I'll let you know how the cake tastes when RUST has finished it.

OK, compiled something within 25 minutes, but not the binary. But you have an overview of some switches.

geckodriver and webdriver seems quite interesting. https://github.com/mozilla/geckodriver

 *Quote:*   

> WebDriver is a remote control interface that enables introspection and control of user agents. It provides a platform- and language-neutral wire protocol as a way for out-of-process programs to remotely instruct the behavior of web browsers.

 

Seems to be connected to [url=https://en.wikipedia.org/wiki/Selenium_(software)]Selenium[/url] for dev purpose. But for a browser that needs to be safe enough to do online banking, this is overkill.

I got me the FF source via: https://archive.mozilla.org/pub/firefox/releases/91.5.0esr/source/

and the Librewolf patches via: git clone https://gitlab.com/librewolf-community/browser/linux.git

PS: Only reason I need FF is the 'hip' use of Webcomponents even in a banking site, where all other browsers except Chrome based ones fail.

----------

