How to install Firefox ESR on Ubuntu 64 bit LTS

Update: 2017-Nov-19: See the last section for automated installation and upgrading, which is now possible.

To read my RSS feeds, I use Tiny Tiny RSS, which worked fine until 21 Feb 2014.

On 22 Feb 2014, Ubuntu pushed Firefox 27, Tiny Tiny RSS stopped working, with a Javascript error. After logging in, there would be a pop up error referring to getCookie and tracing to prototype.js.

To solve this, I went back to the ESR (Extended Support Release). This was quite a few steps, so I am documenting them here.

Remove the existing Firefox packages

You probably already have FireFox installed, and one or two left over packages. In order to find out what is installed, do the following:

dpkg -l | grep firefox

Then, to purge all the old Firefox left overs, do the following:

sudo aptitude purge firefox firefox-3.0 firefox-3.5 firefox-locale-en kubuntu-firefox-installer

Download The Latest ESR for Linux 64 bit

You need to copy the URL for the download link to the latest ESR.

This link will always point to the latest link to 64 bit ESR Firefox.

Download the ESR

Create a directory under your home directory:

mkdir ~/software
cd ~/software/

Download the ESR from the command line using the link you copied in the previous step. Note that at the time of writing this article, the latest ESR is 24.3.0. This number will be different in the future:

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

If your CPU is not capable of executing 64-bit instruction set, then you can use the 32-bit version, as in:

wget -O /tmp/ff.tar.bz2 "https://download.mozilla.org/?product=firefox-esr-latest&os=linux&lang=en-US"

Extract the package

We then extract the package to /opt, where it will create a directory /opt/firefox and put all the files in it.

sudo tar -xvjf /tmp/ff.tar.bz2 -C /opt

Create a shortcut

If you are using KDE like me, then you need to create a shortcut for the newly installed Firefox. To do this, follow these steps:

  • Right click on the "K" icon, and choose "Edit applications", then chose "New Item".
  • Place it under "Internet", and name it "Firefox", and use "/opt/firefox/firefox" for the command.
  • Click on the empty icon, and choose "Other icons", then "Browse", and point to "/opt/firefox/browser/icons/", and choose the icon that is there.
  • Then save the menu item.

You now have a short cut, and you can add it to your favorites menu as well.

Updating FireFox

Because you installed the ESR manually, you can no longer use Ubuntu's excellent apt mechanism to keep Firefox up to date.

Therefore, you have to enable Firefox's native updating mechanism, to check for updates within Firefox. To do so, click on "Edit", then "Preferences", then "Advanced", then "Updates". Choose "Check for updates, but let me choose whether to install them".

You can also click on "Help" then "About", then click on the "Check for Updates" button to see if there updates.

The above may not work still, because you will be running Firefox as a regular user, and not the root user.

To get over this, you would do the following:

Find out what the latest version is, using the link above.

Download the latest version:

cd ~/software
wget -O /tmp/ff.tar.bz2 "https://download.mozilla.org/?product=firefox-esr-latest&os=linux64&lang=en-US"

Then extract the files over the ones already there:

sudo tar -xvjf /tmp/ff.tar.bz2 -C /opt

Finally, restart Firefox.

Automating The Install or Upgrade

This article was written some years ago. Since then Mozilla have improved things somewhat by providing a fixed URL for the latest release. This URL does not contain the version number, and therefore can stay the same always.

Because of this, we can now automate the install and update, using a single command by executing the following script.

#!/bin/sh

FF_ARC="/tmp/ff.tar.bz2"
TARGET_DIR="/opt"
# This is the permanent location for Firefox ESR. It is for the 64bit version.
# If you use the 32bit version, change "os=linux64" below to "os=linux"
FF_ESR="https://download.mozilla.org/?product=firefox-esr-latest&os=linux64&lang=en-US"

wget -O $FF_ARC $FF_ESR

rm -rf $TARGET_DIR/firefox

sudo tar -xvjf $FF_ARC -C /opt

echo "Create a menu entry for '/opt/firefox/firefox' if this is the first time you install ESR"

Contents: 

Tags: