9
August
2024
12:25

Updating Mozilla Firefox on Ubuntu and Debian OS

9 August 2024 12:25

It is possible to update the Mozilla Firefox web browser not from the standard Linux repository, but from the developer's PPA repository.

FireFox installation options

  1. From operating system repository(listed in file /etc/apt/sources.list)
    1. From flatpak. The app store flathub.org offers install Firefox from FlatHub
  2. From Developer's repository PPA(listed in file /etc/apt/sources.list.d/mozilla.list)
  3. From the package file (DEB or RPM).
  4. From assembly files firefox-*.tar.bz2

Here is an option from Developer PPA repository- since applications are installed as updates to existing packages.

Brief plan for updating Mozilla FireFox

Source:Install FireFox on Linux- "Install Firefox .deb package for Debian-based distributions" (En) or Installing the Firefox .deb package for Debian-based distributions (recommended)(Rus).

Updating FireFox consists of four stages:

  • import Mozilla repository key using wget and gpg
  • adding a source-list file for the Mozilla PPA repository to the system, in the /etc/apt/sources.list.d folder
  • setting the priority of the Mozilla PPA over the standard repository
  • apt-get update package update

To change the labels in the latest version of FireFox to Russian:

  • removal of the old language pack - Russification file (translation into Russian) of the previous version
  • installation of a new language pack - a Russification file (translation into Russian) of the current version
  • switching language in the program.

Detailed description of the Mozilla Firefox update

1) creating a directory /etc/apt/keyrings(if does not exist), assign access rights to it

ls -ld /etc/apt/keyrings

If the directory exists, check the attributes.
The line drwxr-xr-x 2 root root means that the rights of the root owner are rwx (7), the root group rights are r-x (5), and the rest are r-x (5), i.e. 755

  • permissions are set correctly.

  • If the /etc/apt/keyrings directory does not exist, create it with one command with the necessary rights

    sudo install -d -m 0755 /etc/apt/keyrings

  • If the rights do not correspond to drwxr-xr-x, set them using chmod

    sudo chmod -R 0755 /etc/apt/keyrings

2) Adding a repository key to the operating system. Importing the key that signed the Mozilla PPA repository

wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null

(If wget is not installed, you can install it with the command sudo apt install wget).

3) Checking the repository key. His fingerprint must match 35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3

gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); if($0 == "35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3") print "\nThe key fingerprint matches ("$0 ").\n"; else print "\nVerification failed: the fingerprint ("$0 ") does not match the expected one.\n"}'

Output "The key fingerprint matches (35BAA0B33E9EB396F59CA838C0BA5CE6DC6315A3)." means the key correct.

4) Now add a text file mozilla.list to the /etc/apt/sources.list.d directory with a description of the Mozilla PPA repository

echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | sudo tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null

The contents of the file can be viewed with the command:

cat /etc/apt/sources.list.d/mozilla.list

It should contain one line
deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main

5) Configuring APT to prioritize the new Mozilla APT repository over the operating system system repository

echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' | sudo tee /etc/apt/preferences.d/mozilla 

If this step is not completed, the update for our firefox package will not be found.

You can view the contents of the mozilla file in the preferences directory with the command. It should be like this:

cat /etc/apt/preferences.d/mozilla

Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000

6) Update the package cache and install the latest version of the FireFox browser

sudo apt-get update && sudo apt-get install firefox -y

7) Before installing a new Russification file, you need to remove the Russian language pack of the old version (128).

sudo apt purge firefox-locale-ru

8) Installing a new package for Russification of FireFox

sudo apt install firefox-l10n-ru -y

9) Launch the browser and change the language of the menu and messages from English to Russian

  • Edit - Preferences - search Language - Russian

10) Add Russian as the preferred language for displaying web pages

  • Edit - Settings - search Language - Select - Select the language you prefer to display pages - Russian

To find out the version of FireFox - menu "Help" - "About FireFox". As of the date of this writing, the latest version is 129.0,
and as of January 15, 2025 - version 134.0.1.



Related publications