Firefox: Difference between revisions

From NixOS Wiki
imported>Equirosa
m Correct typo in firefox link
imported>Equirosa
Add installation section to Firefox page.
Line 1: Line 1:
{{expansion}}
{{expansion}}
[https://www.mozilla.org/firefox Firefox] is a graphical web browser developed by Mozilla.
[https://www.mozilla.org/firefox Firefox] is a graphical web browser developed by Mozilla.
==Installation==
Nix offer's multiple ways to install Firefox.
===Using Nix===
Firefox may be normally installed by using the <code>firefox</code> package.
===Using Home Manager===
Nix's [[Home Manager]] provides a configuration option for managing Firefox profiles. To allow Home Manager to manage Firefox, you should set the following option in your <code>home.nix</code>:
<syntaxhighlight lang="nix">
programs.firefox.enable = true;
</syntaxhighlight>
For more information on managing Firefix with Home Manager, please refer to [https://rycee.gitlab.io/home-manager/options.html#opt-programs.firefox.enable Home Manager's manual's Firefox section ].
==Other Editions==
Nixpkgs also offers other variants of Firefox aside from the ones stated above. These may suit your needs more comfortably than vanilla Firefox.
'''Note:''' The packages for the variants listed below are installed ''instead'' of the normal <code>firefox</code> package and each other, which means that you'll have to choose one among these options.
===Wayland===
Users running a Wayland compositor (such as [[Sway]]) may want to use a Wayland-compatible build of Firefox. This can be achieved by replacing the <code>firefox</code> package with <code>firefox-wayland</code> instead.
===Firefox ESR===
This is the '''E'''xtended '''S'''upport '''R'''elease of Firefox provided by Mozilla, this release receives only security updates and possesses a more relaxed cadence of feature implementation. You can install it by using the <code>firefox-esr</code> package.
===Mozilla Distributed Binaries===
Mozilla themselves provide official pre-built Firefox binaries. It is possible to install these packages through Nix by using the <code>-bin</code> suffix with the package. So you'd use <code>firefox-bin</code> instead of the normal package. This will download the binary from Mozilla's servers and install it on your system.
== FAQ ==
== FAQ ==



Revision as of 02:15, 27 April 2020

Firefox is a graphical web browser developed by Mozilla.

Installation

Nix offer's multiple ways to install Firefox.

Using Nix

Firefox may be normally installed by using the firefox package.

Using Home Manager

Nix's Home Manager provides a configuration option for managing Firefox profiles. To allow Home Manager to manage Firefox, you should set the following option in your home.nix:

programs.firefox.enable = true;

For more information on managing Firefix with Home Manager, please refer to Home Manager's manual's Firefox section .

Other Editions

Nixpkgs also offers other variants of Firefox aside from the ones stated above. These may suit your needs more comfortably than vanilla Firefox.

Note: The packages for the variants listed below are installed instead of the normal firefox package and each other, which means that you'll have to choose one among these options.

Wayland

Users running a Wayland compositor (such as Sway) may want to use a Wayland-compatible build of Firefox. This can be achieved by replacing the firefox package with firefox-wayland instead.

Firefox ESR

This is the Extended Support Release of Firefox provided by Mozilla, this release receives only security updates and possesses a more relaxed cadence of feature implementation. You can install it by using the firefox-esr package.

Mozilla Distributed Binaries

Mozilla themselves provide official pre-built Firefox binaries. It is possible to install these packages through Nix by using the -bin suffix with the package. So you'd use firefox-bin instead of the normal package. This will download the binary from Mozilla's servers and install it on your system.

FAQ

I want Firefox, what is Nightly?

Mozilla's trademarks on Firefox disallows distributing unofficial builds using the Firefox trademark. This is why the Nix-built Firefox is named Nightly.

The official builds are available by enabling unfree and installing firefox-bin.

Firefox ESR and Oracle JDK

Note: It is not clear whether this section is out of date, and whether any Firefox release in Nixpkgs allows to use Java. See https://github.com/NixOS/nixpkgs/issues/84909.

Firefox stops support of Java plugin. To use Java plugin you have to use special Firefox ESR, Extended Support Release.

Also, Oracle doesn't provide a nice way to automate Oracle JDK installation without accepting license. See https://gist.github.com/danbst/30165b59996fb403068c74a95b108d6f for possible way to combine automated JDK and Firefox ESR download.

Troubleshooting

If you can't start the browser because of a configuration error.

For example:

firefox
1554035168269	Marionette	FATAL	Error de análisis XML: entidad indefinida
Ubicación: chrome://browser/content/browser.xul
Línea 2526, columna 13:            <toolbarbutton id="tracking-protection-preferences-button"
JavaScript error: resource:///modules/aboutpages/AboutPrivateBrowsingHandler.jsm, line 28: TypeError: this.pageListener is undefined

An easy way to get away from this is to start firefox with the

firefox -safe-mode

command. Then you can troubleshoot your actual problem or you can call your luck by calling the refresh option (a special button will appear when firefox starts in this mode). This wil reset your configuratino to a sane state and you will be ussually able to start the browser again, but you will loose most of your customization.

Enabling Plasma Browser Integration

1. Add following line to your configuration.nix: nixpkgs.config.firefox.enablePlasmaBrowserIntegration = true;

If you wandering where this part is coming from see NixOS Manual:Customising Packages

2. Install KDE's Firefox extension: Link