SysAdmin Journal
Thoughts, ideas and stories ✍️
Set up the latest version of Mozilla Firefox on your Linux distribution
Posted by Ish Sookun on on Linux
Mozilla Firefox 90.0 running on Debian

Firefox 90.0 was released on 13th July 2021. It was instantly, at least on the same day, available on flathub.org. Therefore, Linux users running flatpak could enjoy the latest release at once.

However, Firefox 90.0 won't be available on regular Linux distribution software repositories at that speed. Even with Linux distros known to be bleeding-edge it usually takes a few days if not weeks before the latest Firefox is tested, packaged and made available in official repos.

Mozilla provides a compressed tarball of the Firefox binaries and libs. These should be sufficient to run Firefox smoothly on almost any Linux distribution. Certainly, it a little of tinkering will be required if you would like to have it running on your system like as if it was installed via the software manager, creating the application shortcuts etc.

How do we do that?

First of all, let's grab the latest Firefox tarball from Mozilla's website. That being done, we decompress and extract the tarball.

tar xjvf firefox-90.0.tar.bz2

The firefox folder is extracted. Now, move the folder to the /opt directory. Keeping it in /opt allows to have a clean setup of third-party software in one location.

Next, we create the application shortcut file named firefox.desktop in the /usr/share/applications directory with the below content.

[Desktop Entry]
Version=1.0
Name=Mozilla Firefox
Exec=/opt/firefox/firefox %U
StartupNotify=true
Terminal=false
Icon=firefox
Type=Application
Categories=Network;WebBrowser;
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/ftp;x-scheme-handler/http;x-scheme-handler/https;
Actions=new-window;new-private-window;

Notice that the "icon" name is "firefox" and we have not provided a location for where this icon may be. The system will look for icons in its system folders with the name provided in the .desktop file. The locations that are searched are:

  • A 32x32 px XPM file in /usr/share/pixmaps
  • Different sizes of PNG files in /usr/share/icons/hicolor/48x48/apps
  • An SVG file in /usr/share/icons/hicolor/scalable/apps

The icons in different PNG sizes are packaged in the Firefox tarball and they are available in the /opt/firefox/browser/chrome/icons/default directory. Each icon can be renamed to firefox.png and copied to its appropriate « size » folder in /usr/share/icons/hicolor/<size>/apps.

That's it, you now have the latest version of Firefox on your Linux distribution with the required shortcuts.

SYSADMIN JOURNAL is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
DefaultValues v2 theme for Ghost. Site cached by LSL Digital in Mauritius.