How to install the latest Firefox (Non-ESR) on Debian 10 Buster (Stable) or Bullseye (test)

Debian Stable and Testing’s repository contains only Firefox-ESR. This article explains how to install the latest Firefox (stable but non-ESR) on Debian Stable (Buster) or Testing (Bullseye).
Firefox ESR or extended support version is the official version of Firefox, focusing on security and stability, not the latest features. During the expansion cycle, no new features were added to Firefox ESR, only high-risk / high-impact security vulnerabilities or major stability issues were fixed.
Therefore, Firefox ESR is mainly targeted at organizations such as universities, governments, or businesses, as well as individuals who prefer a user interface that is functionally stable and remains the same across versions. This article describes two ways to install the latest non-ESR Firefox. On Debian Stable (Buster) or Testing (Bullseye): Install from the Debian Unstable repository (with instructions for proper pinning and reverting changes if needed), or download Firefox manually and include Firefox in the application menu. At the time of writing, the latest Firefox ESR is 68 (68.2) and the latest regular Firefox version is 71. It is worth noting that regular Firefox (non-ESR) will use the new standalone profile. Your Firefox-ESR profile will remain on your system and if you run Firefox ESR it will be loaded, but regular Firefox versions will not use it.

Option # 1: Use the Debian Unstable repository to install the latest Firefox on Debian Stable or Testing

Debian’s “unstable” (codename Sid) repository, like the rolling development version of Debian, will always be used as an unstable branch. After the package is uploaded by its maintainer, it is in the package that the FTP host clears it for release. The name “unstable” does not necessarily mean that these packages are unstable, but that they are less tested, which is expected because they are new packages.
Debian 10 Buster (Stable) and Testing (Bullseye) only contain Firefox ESR in their repositories, while Debian Unstable has the latest regular Firefox version (non-ESR) and Firefox ESR.
The advantage of installing Firefox this way over the other solutions mentioned below is that you can install Firefox maintained by Debian, which includes Debian-specific patches.
Following the instructions below, we will add the Debian Unstable repository in Debian Stable or Testing, and then set the low pin priority for the Unstable repository, so packages cannot be automatically installed from it unless you specify it manually. This way, the normal Firefox version will only be installed or updated if you run the installation command mentioned below.
Other packages in that Unstable repository (except Firefox dependencies) will not be installed automatically, so you will continue to use Debian Stable or Testing (depending on what you are using). This article also provides instructions for completely undoing this action. Add Debian Unstable repository on Debian 10 Buster (Stable) or Debian Bullseye (test).
Open first /etc/apt/sources.list Take a text editor (such as Nano) as the root:

sudo nano /etc/apt/sources.list

Add the following line at the end of this file (do not make any modifications):

deb http://deb.debian.org/debian/ unstable main contrib non-free

After adding, save the file and exit the text editor (if you are using Nano press Ctrl + O Followed Enter Save the file and use exit Ctrl + X).2. Set low pin priority for Debian Unstable repositories so that the system will not automatically install packages from it unless you specify it manually.
Create and open a file /etc/apt/preferences.d/99pin-unstable Take a text editor (for example using the Nano command line text editor) as the root

sudo nano /etc/apt/preferences.d/99pin-unstable

Paste the following into this file:

Package: *
Pin: release a=stable
Pin-Priority: 900

Package: *
Pin release a=unstable
Pin-Priority: 10

After adding, save the file and exit the text editor (if you are using Nano press Ctrl + O,then press Enter Save the file and use exit Ctrl + X). 3. Install the latest regular (non-ESR) Firefox on Debian 10 Buster (Stable) or Testing (Bullseye).
You can now install the latest normal Firefox on Debian 10 Buster (Stable) or Bullseye (Testing):

sudo apt update
sudo apt install -t unstable firefox

note! usually apt install firefox Unavailable due to fixed rules. Install it exactly as described in this article-use apt install -t unstable firefox.
For more information on apt pinning, check out this page on the Debian Wiki.
If you find that the normal Firefox version and Firefox ESR are incompatible when both are installed on your system (I haven’t noticed any problems, but I think I’m just in case), you can remove Firefox ESR from Debian. installation:

sudo apt purge firefox-esr

You might also like: 3 ways to install Tor Browser on Linux

How to undo this and downgrade the packages installed from the Debian Unstable repository

Even though we only installed Firefox from the Debian Unstable repository as explained in this article, Firefox itself introduces some dependencies from Debian Unstable (requires it to work properly).
If you change your mind later and want to undo the changes, you can downgrade the package from the Debian Unstable repository to the Debian Stable / Testing version.
To do this, open /etc/apt/preferences.d/99pin-unstable The file we created under step 2, using a text editor (eg Nano):

sudo nano /etc/apt/preferences.d/99pin-unstable

Change in this file stable Take precedence over 1001with unstable Take precedence over -1, like this:

Package: *
Pin: release a=stable
Pin-Priority: 1001

Package: *
Pin release a=unstable
Pin-Priority: -1

When done, save the file and exit the text editor (if you are using Nano press) Ctrl + O,then press Enter Save the file and use exit Ctrl + X).
Next, run apt update with apt full-upgradeAnd apt will downgrade all packages in the Debian Unstable repository (and remove packages that are only available in Unstable repository):

sudo apt update
sudo apt full-upgrade

After that you can delete /etc/apt/preferences.d/99pin-unstable Files and Debian Unstable apt repository /etc/apt/sources.list.
Source (but I modified the repository and added the undo instructions): u / kotajacob on Reddit.

Option 2: manually install the latest regular Firefox on Debian Stable or Testing

Another way to install the latest regular (non-ESR) Firefox on Debian 10 Buster (Stable) or Bullseye (Testing) is to manually install it using the binaries provided by Mozilla. The benefit of this is that it can automatically update itself and receive updates1 as soon as Mozilla releases them. Download Firefox for Linux (by Mozilla) and unzip it.
Go to the Firefox download page and click Download Now Button to get the latest version of Firefox.
Unzip the downloaded Linux Firefox build and move it to a folder on a system where your users have write permission so that Firefox can update automatically. For example, you can move the Firefox folder to /opt/firefoxAnd change /opt/firefox Folders and /opt/firefox/firefox permission 755.
E.g. If you unzipped the firefox folder to your home directory, move it to /opt And change /opt/firefox Folders and /opt/firefox/firefox permission 755 (To enable it to update automatically) use:

sudo mv firefox /opt/
sudo chmod 755 /opt/firefox
sudo chmod 755 /opt/firefox/firefox

2. Add Firefox to the application menu.
Next, you need to add Firefox to the menu. In a GTK-based desktop environment, you can use MenuLibre to add applications to menus. Install it on Debian using the following command:

sudo apt install menulibre

In a Qt / KDE-based desktop environment, you can add (and edit) applications to the menu with the help of the KDE menu editor, which can be installed on Debian using:

sudo apt install kmenuedit

For MenuLibre and KDE menu editors, the instructions for adding a new application to a menu are very similar. Below I will explain only the steps of MenuLibre.
Run MenuLibre (may display as Menu Editor In the application menu), click Internet Categories in the sidebar and click + Button and select Add Launcher:MenuLibre adds Firefox
An application launcher with an empty (default) value is created. Next, click New Launcher Near the top of this new empty launcher to edit its text and change it to Firefox:MenuLibre adds Firefox
Next, click on the icon (to the left of the “New Launcher” text) and select Browse Files... Then go to the location where you unzipped Firefox and browse the Firefox icon browser/chrome/icons/defaultAnd select the largest icon from them.
For example, if you /opt/firefoxThe path of the icon is: /opt/firefox/browser/chrome/icons/default).
Now you need to add the path of the Firefox executable to our new launcher. Click the folder icon next to the Command field in MenuLibre and browse to firefox executable file. It should be located in the folder where you extracted Firefox (for example, if you have /opt/firefox As the folder where you extracted Firefox, the path to the Firefox executable is /opt/firefox/firefox):Menulibre adds Firefox
Next, if you see two other categories, X-XFCE with X-Xfce-Toplevel, Click on them, then - (Minus / hyphen) button:Menulibre fix duplicate menu items
If you have these two categories, you may see duplicate Firefox entries in the application menu. When done, remember to click Save Click the button from the MenuLibre toolbar to save and create a new Firefox launcher.
You should now find the regular Firefox version in the application menu. This is the latest Firefox in the application menu on Debian 10.2 Buster (Stable) (I have both regular and ESR installed):How to install the latest Firefox (Non-ESR) on Debian 10 Buster (Stable) or Bullseye (test)It’s worth noting that you can also use the packages in the Snap Store to install the latest Firefox non-ESR on Debian. But this has a lot of drawbacks and quirks: startup can be slow, in some cases disrespecting system themes (including mouse cursor themes), on Debian it is not integrated in the application menu and executables and is not automatically added to you $ PATH (even after a system restart-as I observed in tests on Debian 10 Buster).

Source

Sidebar