1. Home
  2. Linux

How To Get Firefox Quantum On Debian Stable

Due to Debian Stable’s snail pace when it comes to packages, the Mozilla Firefox web browser receives updates very slowly. This isn’t too much of a problem since Debian Stable users know what they’re signing up for but it does pose an inconvenience every now and then. Mozilla has just released Firefox Quantum but, Debian Stable users cannot just update to it. Here’s how you can get Firefox Quantum on Debian Stable. If you’re interested in getting updated versions of other apps on Debian, check out our guide to get newer software on Debian Stable.

Replacing Firefox Extended Release

Instead of the latest version of Mozilla Firefox, Debian Stable users enjoy Firefox Extended Release.  The browser is a a  long term supported release of Firefox devoid of newer features, speed improvements and such. Many users won’t think much of updates to a silly browser,  as they just need to browse the web and don’t care about the latest features that do little to improve the browsing experience.

It is worth noting that with each release the Mozilla team has improved speed, fixed bugs and made the browser better overall. If you’re looking to get a more up to date version of the browser, you’ll have to first replace Firefox ESR.

The fastest way to update Firefox ESR is to just uninstall Firefox ESR, and then download the binary version of Firefox. Getting the binary version of Firefox isn’t as good as installing from the Debian software sources, as you’ll need to check for updates manually.

To start off, uninstall Firefox ESR with the package manager:

su

apt remove firefox-esr

Then, in root, install wget (if you don’t have it already).

apt install wget

Using the wget downloader tool, grab the latest version of Firefox directly from Mozilla.

wget -O FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"

Stay in root, and make a new folder for Firefox in the /opt/ area of the file system.

mkdir -p /opt/firefox

With the new directory made, install Firefox to /opt/firefox/ by extracting the downloaded FirefoxSetup.tar.bz2 archive.

tar xjfv FirefoxSetup.tar.bz2 -C /opt/firefox

Making The Desktop File

A newer version of Firefox is installed on the system. Everything is almost ready. All that is left to do is to make a shortcut for the desktop. To start off, open a text editor. In this example, we’ll use the Nano text editor (as root).

su
nano /usr/share/applications/firefox.desktop

Take the code below and paste it into the text editor.

[Desktop Entry]
 Version=1.0
 Name=Firefox
 GenericName=Web Browser
 Exec=/usr/lib/firefox %u
 Icon=firefox-esr
 Terminal=false
 Type=Application
 MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
 StartupNotify=true
 Categories=Network;WebBrowser;
 Keywords=web;browser;internet;
 Actions=new-window;new-private-window;
 [Desktop Action new-window]
 Name=New Window
 Exec=/usr/lib/firefox --new-window %u
 [Desktop Action new-private-window]
 Name=New Private Window
 Exec=/usr/lib/firefox --private-window %u

Press Ctrl + O to save the new Firefox desktop entry. Then, update the permissions of the file with the chmod command.

chmod +x /usr/share/applications/firefox.desktop

After updating the permissions, Debian will see the new desktop entry, and recognize it as an application. Look for Firefox in the “Internet” section of your desktop environment (if you use the XFCE version). Or, simply search “Firefox” if you’re using the Gnome or KDE version.

Lastly, once Firefox is in the /opt/firefox/ directory, create a symlink from there to /usr/lib/ so that your user can run Firefox.

ln -s /opt/firefox/firefox /usr/lib/

Updating Binary Version Of Firefox

Manually installing Firefox rather than getting the official Linux distribution version has positives and negatives. The positive aspect of using this version of Firefox, is that users can enjoy a stable core operating system and still enjoy the latest version of their favorite open source browser. The downside is that any updates have to be manually installed. Apt won’t do it in this case.

To know when Firefox updates, it’s best to keep up with the Firefox future release blog. Check it every once in a while, and see if there’s a new release. Another good idea is to go to check the version number. The browser will tell you if it’s up to date. Version number information in Firefox is available in: Preferences > General

Firefox Update Tool

Updating Firefox manually can be a pain. A good way to fix this issue is to make your own update tool. It won’t be nearly as good as using the Debian package manager, but it’s enough to ensure that getting the latest version of Firefox doesn’t become a tedious process. To start off, gain a root shell in the terminal with the su command.

su

Inside root, open the Nano text editor.

nano /usr/bin/firefox-updater

The first thing to do in the update tool is a shebang. This part of the script is very important, because without it, the system will not know what to do with the commands. Write out:

#!/bin/bash

After filling in the shebang,  add the actual commands.

wget -O FirefoxSetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
tar xjfv FirefoxSetup.tar.bz2 -C /opt/firefox/ --overwrite

rm FirefoxSetup.tar.bz2

When the commands are all written out, save the file with Ctrl + O. Then, update the permissions of the script in /usr/bin/ with:

chmod +x /usr/bin/firefox-updater

To update Firefox, first gain root with su, then run the tool.

su
firefox-updater

Firefox usually updates every couple of months with major releases, and every couple of weeks (or even days) with minor updates. For best results, run the updater once a week.

Leave a comment

  • Hi ! Nice article. I cannot make the desktop file work unfortunately. Using debian + i3wm.
    The update script gives error as well.

    • Mr_Gentoo

      I had the same issue when I was testing, but it was because I didn’t set up the symlink. A good idea is to move the desktop file from /usr/share/applications, and place it on the desktop, if it’s not working.

      In my testing, the desktop file is a bit iffy.

      Also make sure you are symlinking the binary from /opt/firefox/ to /usr/lib.

      Side note: another alternative could be to modify the FIrefox ESR desktop file.

      It might also be a good idea to update permissions on the Firefox folder. I didn’t have issues like that, but every system is different. Just cd into /opt and do:
      su

      chmod 755 -R firefox

  • Ben

    Hi!
    Thanks for the article.
    I’m on Debian 9 but I can’t see the desktop entry…
    Any idea?
    Thanks!

    • earandnow

      the desktop entry is wrong, the Exec line should be

      “Exec=/usr/lib/firefox/firefox %u” and not “Exec=/usr/lib/firefox %u”