Firefox

Firefox is Article description::Mozilla's web browser. It is not the same thing as Firefox OS, which was a full operating system.

Aurora is the "unbranded" version of Mozilla's Firefox.

USE flags
The above list of USE flag is not comprehensive. Use (part of ) for a full list:

Emerge
To compile the source version of Firefox ESR, issue:

Be aware that non-ESR versions are not getting stabilized. Stable versions of  may be more recent.

Emerging the source version of Firefox can be a long process; a pre-compiled (binary) version does exist in the Gentoo repository, however users of the pre-built package should note the warning below and this message. To emerge the Firefox binary, issue:

Running under Wayland
Since Firefox 65, it is possible to run Firefox natively under Wayland by launching it with the  environment variable set after having emerged Firefox with the USE flag   enabled. From a terminal:

Also, make sure that the generic Wayland environment variables XDG_RUNTIME_DIR, WAYLAND_DISPLAY , and XDG_SESSION_TYPE are exported correctly to ensure that GDK can communicate with the compositor.

To set Firefox to always open using the Wayland backend, set the following environment variable in the user's shell. Bash is the default user shell on Gentoo systems:

Xinput2 scrolling
This brings touch scrolling and multitouch support for Firefox:

MOZ_USE_XINPUT2 environment variable has to be set to a value of  in, or just before launching  in a shell. for example:

This also eliminates the predefined scroll step size for touchpad scrolling! All scrolling will be really smooth.

Wacom tablets/touchscreens may need extra configuration so they emit true touch events for X.

Multitouch zoom
This only works when the multitouch events reach Firefox, therefore the  activation above has to be done first.

Middle mouse scroll (autoscroll)
Traditionally in Linux, the middle mouse button is used to paste the currently selected (highlighted) text into a text field. On Windows systems, the middle mouse button in Firefox is used for click-and-drag scrolling up and down the page. This functionality can be enabled in Firefox by opening  and setting the following value :



Middle click-and-drag scrolling should now be enabled.

Although not necessary, sometimes it is desirable to disable all other middle-click functionality within Firefox when using click-and-drap scrolling. Open  and set the following values to disable middle-click functionality:



Threads
Firefox >= 54 has 4 threads enabled by default. Threads can be adjusted by modifying the following in the  interface:

Where  is an integer number.

Audio backend
Firefox's cubeb audio library supports a number of different backends.

Disabling percent-encoding
Normally, URLs that are copied from the address bar get percent-encoded. This may cause an annoyance when certain non-Latin symbols (such as Cyrillic) get encoded, as they become unreadable to humans.

To disable percent-encoding when copying from the address bar, set the  option   to.

Disable enforced digital signatures verification in Firefox >=48
This concerns mandatory add-ons signature in Firefox and can lead to security issues.

Method 1
Create this file:

Then insert this:

Method 2
https://gist.github.com/anonymous/a661949550a26b9522f79095f8ae2d94

Method 3
This patch works for both firefox 49 and firefox 51, and seems to be robust to changes.

The following patch also works for firefox 49.

Then set  to false.

Special URLs
Firefox includes a few dozen special URLs that can be helpful in determining more information about various Firefox settings. These URLs can be entered into the Super Bar (via copy and paste) to view the special pages. A few of the more significant ones include:


 * - Page for managing extensions.
 * - Page containing build information about the currently running version of Firefox. Use this page to check what compiler flags were set during Firefox's build.
 * - Information about the Network Cache Storage Service.
 * - Modify internal browser settings and preferences.
 * - Measure and show memory reports, free memory, etc.
 * - Analyze current network information such as HTTP, socket, and DNS connections.
 * - List installed plugins such as Widevine Content Decryption Module (DRM software).
 * - A page containing technical information that might be useful when trying to solve a problem. Includes information on WebGL, Window Protocol (X11 or Wayland), and compositing graphics backends.

Finally,  will display the whole list of Firefox' “about” pages. A description for each page is available at Firefox and the "about" protocol.

See also Firefox chrome:// document URLs.

XDG integration
In order to make Firefox use XDG file associations set Content Type's Action to

To ensure Firefox is being used by other applications for handling HTTP and HTTPS links, run the following commands:

Running under KDE
Firefox is built with GTK, and by default will use the GTK file picker. To enable the KDE file picker, install, which is installed by default if is installed. After that set  to   in.

Running in sandbox
Please see Simple sandbox for suggestions on sandboxing Firefox.

SSL/TLS security enhancements
Some  SSL/TLS security options which are not defaults (as of Firefox 52.2.0) that increase the security of HTTPS connections are listed below. Two of them rarely break access to websites.

Safer browsing with add-ons
Many users are concerned about their privacy (tracking, bubbling, targeting, etc) while web browsing. Installing Add-ons can aid in adding an extra level of privacy to their browsing.

The add-on menu can be accessed by navigating the following menus:

uBlock Origin
An ad blocker with lower resource usage, using same lists as Adblock.

Mozilla Add-ons page: https://addons.mozilla.org/en/firefox/addon/ublock-origin/

GitHub: https://github.com/gorhill/uBlock

Wikipedia: https://en.wikipedia.org/wiki/UBlock

NoScript
NoScript blocks JavaScript that is normally enabled by default. It can keep users safe and speed up web browsing.

Mozilla Add-ons page: https://addons.mozilla.org/en-US/firefox/addon/noscript/

Homepage: https://noscript.net/

uMatrix
Point and click to forbid/allow any class of requests made by your browser. Use it to block scripts, iframes, ads, Facebook, etc. uMatrix can also be used for spoofing HTTP referrer, spoofing User Agent strings, blocking hyperlink auditing and forcing strict HTTPS. Note, uMatrix can break many websites and most websites need configuration changes to work correctly.

Mozilla Add-ons page: https://addons.mozilla.org/en-US/firefox/addon/umatrix/

GitHub: https://github.com/gorhill/uMatrix

Video speed controller
Using an HTML5 video speed controller can be helpful in accelerating the playback rate of HTML 5 video. This is useful when binging video content on sites that do not offer increases in video playback speed (such as Amazon Prime Video or Netflix).

Mozilla Add-ons page: https://addons.mozilla.org/en-US/firefox/addon/videospeed/

GitHub: https://github.com/codebicycle/videospeed

gtk+:3 pulls in DBUS
Since version ≥53.0, Firefox has dropped gtk+:2 support urging Larry to use gtk+:3. This, however, by default, pulls-in annoyances like DBUS. This can be avoided by using a patch from BSD available in or the mv overlay.

Please note that, when running Firefox under native Wayland (i.e. not using XWayland), Firefox will implicitly try to use DBus to enable its remote control feature and crash, likely with a segfault, due to the lack of DBus. Thus, it is necessary to invoke Firefox with the  command-line argument or   environment variable set (to anything).

Crashes
If Firefox crashes for no apparent reason every few minutes with an error message like  it might help to add the Firefox user(s) to the video group:

Lack of sound (www-client/firefox-bin)
www-client/firefox-bin expects PulseAudio. Alsa-only systems might work around this limitation by using media-sound/apulse. For this to work you'll need to modify Firefox sandbox settings by going to  and adding "/dev/snd/" (note the trailing slash) to "security.sandbox.content.write_path_whitelist" option.

If you're storing ALSA settings in /home, also, be sure to add "/home/ /.asoundrc" to the "security.sandbox.content.write_path_whitelist" option. Whitelist path could be separated by comma.

Since around Firefox 58 there is additional modification needed to work around seccomp sandbox:

Now you can go ahead and create alias for running firefox through apulse:

Screen tearing / stuttering smooth scrolling
Build with USE flag , check about:support about WebRender. On Wayland you will not have screen tearing.

Another option: video drivers, for example about Intel.

Green video screen (youtube)
If disabling (graphics) acceleration in settings does not work, disabling the equivalent options under  like   (85.0) might.

Windows decorations missing in Fluxbox since FF-91.3.0

 * https://forums.gentoo.org/viewtopic-t-1141870.html

External resources

 * The official Firefox wiki (out-of-date)
 * Firefox on Mozilla's Forums
 * Firefox on Mozilla's Buglist
 * Change the interface language (L10N)
 * Creating a new profile
 * Firefox about:config privacy enhancements