Firefox & Thunderbird: How to install a Mozilla build

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Firefox & Thunderbird: How to install a Mozilla build

Post by Cosmo. » Sat Aug 15, 2015 3:06 pm

Although Firefox and Thunderbird are in the repositories, there might be reasons to replace them with the builds provided by Mozilla. One reason might be, that bug-fix releases do not always appear as soon as wanted in the repositories, another reason might be to use the ESR-version of Firefox. The below described methods do apply in both cases, they mainly differ in the downloaded file.

The principle steps are the same for Firefox and Thunderbird. Simply replace firefox with thunderbird in the following advices (if needed).

To replace the repository-build follow these steps:

1. Download the needed file in your language:
You find the latest version of the Frefox-release version here.
You find the latest version of the Firefox-ESR version here.
You find the latest version of Thunderbird here.

2. The following is not technically needed, but it avoids much circumstantial work to create a new program-launcher.
Open your file-manager as root.
Open the folder /root and create a new folder, name it files.
Open a second pane in the file-manager and go there to /usr/share/applications. Copy the respective desktop-file (either firefox.desktp or thunderbird.desktop) to the above created folder files. Note, that you might see the filename without the extension .desktop.
Leave the program open for later reuse.

3. Close Firefox respectively Thunderbird completely.

4. Remove Firefox respectively Thunderbird with the packet manager from your system. Remove also the package firefox-locale-XX (where XX depends from your language) respectively thunderbird-locale-XX and for Thunderbird also thunderbird-gnome-support.

5. Go with your file-manager - not elevated - to the folder, where you downloaded your file in step 1.
Unpack the folder (you should find the command in the context menu).

6. Go to the elevated file-manager (from step 2) and open in one pane the folder with the unpacked program, open in the other folder /opt.
Note: depending from the version of Mint the folder /opt does or does not exist by default. If it does not exist for you, you simply create it with the elevated file-manager: Go into the file system's base, create it a new folder there and name it opt. It will now be placed between the folders /mnt and /proc. If done open this folder as said in the first line of #6.
Copy the unpacked folder firefox respectively thunderbird to /opt.
Go into the copied folder /opt/firefox respectively /opt/thunderbird.
Go into the other pane to /usr/bin.
Create a link from the executable file firefox respectively thunderbird to /usr/bin. You can easily do this if you drag the file from its folder into /usr/bin whilst holding ctrl and shift keys together.

7. Still with the elevated file-manager go with one pane to the folder files (created in step 2) and with the other pane to /usr/share/applications.
Copy the file firefox.desktop respectively thunderbird.desktop from /root/files to /usr/share/applications.
Close this instance of your file-manager, it is not more needed.

In principle you are ready to use the programs; all launchers you have will continue to work. But you should anyway also note the following remarks:

1. The described method has been tested here several times in the last years and has been proven to work. You should anyway make a backup of your profile, before you continue, especially if you switch to Firefox-ESR. For backing up you copy those folders with a not-elevated instance of your file-manager:
For Firefox: .mozilla
For Thunderbird: .thunderbird.
You must have made hidden files visible in the file-manager to see those folders.

2. When you launch the program for the first time, it will ask you, if it should make it as your default-browser or e-mal-client. Do not accept it and unset to ask again. If you accept, it will only create a useless and irritating additional program-launcher. Your old settings are still valid.
This question does appear every time, you create a new profile or if you start the program for the first time in another user-account. Also in these cases do as described above.

Additional reading:
Solve a problem after removing pre-installed Firefox or Thunderbird.
How to update Mozilla builds

Additional notice:
When you have already used a higher version of FF than the one, where the current ESR version is based on, reusing your old profile would effectively mean to downgrade the Firefox-profile. Downgrading the profile has never been officially supported by Mozilla. Since Firefox 55 this is especially cumbersome, if you want to switch to the current ESR version (at the end of 2017 based on Firefox 52). All kind of trouble can arise, at now especially missing favicons are a known problem.

So it is advisable to create a new profile after having the ESR version installed. By doing this you will obviously loose all your bookmarks. So prepare yourself before you switch Firefox to the ESR version and do with the release version at first an export of the bookmarks, before you remove it.
Last edited by Cosmo. on Thu Nov 23, 2017 6:51 am, edited 4 times in total.

Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Solve a problem after removing pre-installed Programs

Post by Cosmo. » Sat Aug 15, 2015 3:35 pm

Removing the pre-installed programs Firefox and Thunderbird as described produces a small problem. BTW, this also applies to Libre-Office and the below described solution can also be applied for that.

The problem is, that in the language settings the installed languages get marked as incomplete. If you let the language settings do a completion of the language packs, the just removed programs get again installed.

The reason for this is, that in the file /usr/lib/linuxmint/mintLocale/ some programs are hard-coded for checking. To solve this open your text editor with elevated rights, by entering this in the command line (press alt-F2 to open it):

Code: Select all

gksudo X_editor-name_X /usr/lib/linuxmint/mintLocale/
For the KDE-edition you must use instead:

Code: Select all

kdesudo X_editor-name_X /usr/lib/linuxmint/mintLocale/
Replace X-editor-name_X with your text editor.

Now I strongly advice, to deactivate the automatic line breaks, otherwise you risk to do some mistake which may brake this file.

Near the top you get a part with the following code (excerpt):

Code: Select all

        if codename == "debian":
            self.pack_prefixes = ["firefox-l10n-", "thunderbird-l10n-", "libreoffice-l10n-", "hunspell-"]
            self.pack_prefixes = ["language-pack-", "language-pack-gnome-", "firefox-locale-", "thunderbird-locale-", "libreoffice-l10n-", "hunspell-"]
Out of interest is only the last line (the others are here for easier locating them).
Copy the complete line, than insert it in a new line directly below.
Now insert # at the beginning of the first of the both identical lines.
Edit the other line and remove the expression firefox-locale-, thunderbird-locale-, libreoffice-l10n- (depending from the package you have removed) inclusive the trailing comma.
Save the file.

What it does:
The line where you have set # at the beginning is the original line; the # means a comment, so that this line gets ignored during execution. With this measurement you can easily get back to the original state by removing #.
The edited line replaces the commented line and removes those programs from checks. If you want go back to the original state, (by uncommenting the other line), you have to remove this line or comment it out with the leading #.

Note: In case of an update of the package mintlocale this file will get overwritten, so that you have to redo the described steps. This does not happen often. In fact it only happened here in 13 months one time by upgrading from LM 17.

If you now re-open the language settings you will find, that there is no more the complaint about incomplete packages.
Last edited by Cosmo. on Sat May 13, 2017 6:22 am, edited 1 time in total.

Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

How to update Mozilla builds

Post by Cosmo. » Sat Aug 15, 2015 4:11 pm

Updating Firefox and Thunderbird after having installed the Mozilla build is easy. You do not need to download and install again, but you can do this as an online-update.

If a new version of the program is available the user gets 2 kinds of notification:
At first through the system notification (only visible for a few seconds).
Some time later a separate window pops up and informs the user about the new version. this window stays open permanently until the user closes it, so you will not miss it, because you are not in front of your monitor, when it arrives.
This window provides 2 options:
- do the update later
- download the update

Always say "later", because you do not have the needed privileges for directly updating.

Do apply the update follow these steps:

1. Close all instances of this programs completely (inclusive the notification popup, if it is still open).

2. Open a command line (press alt-F2) and enter the matching command:

Code: Select all

gksudo firefox
gksudo thunderbird
kdesudo firefox
kdesudo thunderbird
(kdesudo is for the KDE-edition, otherwise gksudo applys).
You have to enter this command only the first time, because it gets stored in the history, so you can get it back the next time by pressing the up-arrow-key.
In this - and only in this - case you run the program with elevated rights!
Don't be astonished, that you do not see any of your personalization.

There is a one-time specialty for Thunderbird, see below.

3. Click the sandwich icon, click the help icon and choose About Firefox respectively About Thunderbird.
If a new version is available the download and installation of the update starts immediately. Especially in case of a minor update the download is very fast, as in those cases a incremental update takes place.
If the installation of the update is nearly finished you find a button to restart the program. Do it. After restarting you may - and should - close the elevated instance.

You can now start and use your program as usual.

Specialty for Thunderbird
The first time you start Thunderbird with elevated rights you find a big box, which asks you to create or configure your e-mail account. You can click (on the bottom right) that you do it later and can than proceed with step 3 above, but in this case this box will again open, when you do the next update. You can prevent this annoyance easily doing this:

After having closed the box click the sandwich icon, click on settings, click on account settings.
On the bottom of the left part click on account-actions, click on adding a feed-account and go through the steps without entering or changing anything of the default. This feed-account doesn't do anything, as you do not subscribe any feed, but Thunderbird is happy and will not ask you again about your e-mail account.

User avatar
Level 7
Level 7
Posts: 1614
Joined: Thu Feb 25, 2016 8:57 pm

Re: Firefox & Thunderbird: How to install a Mozilla build

Post by Schultz » Wed Jun 28, 2017 8:47 pm

If I download Waterfox, and changed all the folders and files named "Waterfox" to Firefox, and then installed it via the instructions here, would that work, or mess things up? I ask because 1) time is not on the side of those who want to avoid FF 57, and the ESR will only delay the inevitable; and, 2) I've read that the Waterfox developer intends to continue developing the last ESR version before 57 with security updates once Mozilla goes beyond that. (That was a while ago, I don't know if anything has changed.)

Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Firefox & Thunderbird: How to install a Mozilla build

Post by Cosmo. » Thu Jun 29, 2017 5:58 am

I have never tried that, but it might work.

Current situation is this:
The current ESR of Firefox is 52.x. ESR 52 will be supported for nearly 12 months; at the end of June 2018 an upgrade to the next ESR 59 will be mandatory. [1] That means, that we have after the release of Firefox 57 (announced for mid of November) 6 months time, to evaluate the new system and the changes. As you might know, I am not a fan of some things, which Mozilla does, but I refuse to judge on speculations and on partially - as so often from unofficial sources - wrong information. It is now simply to early.

[1] Mozilla has stretched the release cycle some time ago. Whereas in the past there was a new Firefox release available every 6 weeks (except at the time of a new year, where it was 7 weeks), this is now reduced to a new version at 7, 8, in some cases even 9 weeks. This gives a little longer life time for every version and in case of ESR the life time increases significantly. Firefox 59 will be released in next March, but only in June an upgrade from ESR 52 to ESR 59 will get mandatory.

Level 23
Level 23
Posts: 17830
Joined: Sat Dec 06, 2014 7:34 am

Re: Firefox & Thunderbird: How to install a Mozilla build

Post by Cosmo. » Tue Dec 26, 2017 5:51 pm

The release plan for Firefox ESR has been changed in the meantime.

So the following major ESR version after ESR 52 will be ESR 60 (not 59 as originally planned). This has the consequence, that in July 2018 a last minor update for ESR 52 will be released and it will be supported until the end of August 2018. That gives from time of this post 8 months time to see, how far the extension API in Firefox has (hopefully) been enhanced and how far the extension developers have developed their new extensions.

Post Reply

Return to “Tutorials”