What is the best way to do this? Is there a specific update site or should I download the binaries manually? If doing manually, in which directory should I put the files? In my home directory, or is there a better place?

11 Answers
11

The latest version of Firefox is available for as a security updates in all supported releases of Ubuntu, just doing a normal update will pull it in. You need to enable at least one of the security or updates repositories (e. g. via Software & Updates → Updates); security should be enabled by default but it's better to check, especially if the package manager doesn't update Firefox yet.

Usually it's available within a few hours of Mozilla's announcement, sometimes faster, depending on the archive builders, and the speed of your local mirror, etc.

There are several methods of installing a non-default version of Firefox, that are covered by my tutorial Installing Other Versions, which has detailed explanations and method comparisons. So I will post here only the relevant information regarding Firefox 4. Please do not use multiple methods. Pick one and stick with it or revert the changes before trying a different one. I recommend the manual installation method, since depending on the PPA you choose, you will also update Firefox 3.6 and other Mozilla products.

Since it is still a Beta release and there are some radical changes in this version, is recommended that you install it side-by-side with the default version and use a different user profile, in order to avoid data loss.

The easiest way to install Firefox 4 downloaded from Mozilla is to use my extension FoxTester. It allows you to install any number of different Firefox versions, without interfering with your default installation and user profile. Everything is done through Firefox context menu, without typing commands or even closing Firefox. Although this extension is not intended for upgrading Firefox, it also allows to make any version installation permanent.

If you prefer to do it manually, then follow the instructions of method #1 from the Installing Other Versions tutorial. Basically, you will extract the downloaded file to your /home directory or the /opt and execute the firefox file inside it. There are also additional steps on that tutorial if you want to make it fully compatible with plugins.

Method #2 - Ubuntuzilla repository

This method will only be available to 32bit users, after the release of the final version of Firefox 4.

Method #3 - Installing from PPA repositories

Firefox 4 is currently available through ubuntu-mozilla-daily PPA repository (semi-official) and SilverWave PPA repository (non-official). You need to add one of those ppa repositories to your sources list, then update and install Firefox 4.

To install from ubuntu-mozilla-daily on Karmic, Lucid or Maverick, run the following commands:

The ubuntu-mozilla-daily ppa also upgrade your default Firefox installation with the latest testing version of Firefox 3.x and other Mozilla applications. So although the SilverWave PP is not official, it might be less troublesome to use it instead.

When you install Firefox 4 using one of those repositories, a clone of your Firefox user profile is created under ~/.mozilla/firefox-4.0. So everything you do on Firefox 4 won't be saved on your default profile. This could cause confusion and apparent loss of data (bookmarks, passwords...) if you switch back and forth between Firefox 3.6 and Firefox 4 or when the last one becomes default and start using the default profile folder (i.e ~/.mozilla/firefox).

Add-on Compatibility

During the beta phase and to some extent after the final release of Firefox 4, most extensions and themes won't be compatible with it and thus not activated. Usually when you are testing a minor update version, you can disable compatibility check, to force extensions to be installed and activated. But is not so simple in this case, due to radical changes in the UI and the extension API of Firefox 4. So even with the compatibility check disable, several extensions won't work at all or could break other extensions and even Firefox.

It is strongly advised to start the "Error Console" (CTRL+SHIFT+J) while using Firefox with extensions that are incompatible. Disable any extension that cause an error. You might have to enable only the error report to avoid lots of css messages from web sites.

Optimization

Although Firefox 4 is a lot faster than Firefox 3.6, is always a good idea to keep it fast by optimizing databases and tweaking some preferences.

Database Optimization: improves startup time and performance considerably, specially on features like the awesome bar suggestions or bookmark management.

BarTab: this nice extension allows to prevent tabs from loading the page content until they are needed. So if you usually start Firefox with several tabs, this will save memory space and improve startup time and responsiveness.

Better Cache: this extension allows to better control how Firefox handle the content cache, allowing to avoid constantly reloading pages and elements, thus reducing page display time considerably. Make sure you read the manual, because you might prevent sites that need to constantly reloaded from displaying new content (works with compatibility disabled).

Customization

The very anticipated new UI hasn't been released for Linux yet. So, Firefox 4 still looks very similar to 3.6, except for a few changes, like for example the ability to place tabs on top [View >> Toolbars >> Tabs on Top]. Nevertheless, you can change a lot of things as usual, using the built-in options, themes, scripts, extensions or changing the userChrome.css.

Firefather, I am just tired of updating the same info on multiple sites every time Mozilla or Ubuntu change something. If you read the link content you will see the information is good and updated. Take care.
– lovinglinuxMar 25 '11 at 12:02

And what happens if the content of the link changes, or the link stops working altogether? Then your answer wouldn't be very helpful at all anymore.
– RyanAug 17 '11 at 8:30

Download it from mozilla.com and extract it (to wherever you want). It creates a folder called "firefox" and in that folder there is a file called "firefox". Drag this file onto your panel, and it asks you to give the new launcher a name (call it Firefox, but it doesn't matter), and you're done. To open Firefox just use the new launcher on the panel (the correct icon should be there automatically).

Be wary though that the firefox command still opens your old installation.

This is essentially what I do, and it updates fine for me. If you have a multi-user system, this becomes problematic, but if you're installing it for yourself this works well.
– belacquaMar 14 '11 at 22:08

This is "windows" like way of updating software. Impractical if you need to keep up to date many applications.
– PeterMMay 9 '17 at 7:32

Always use repositories if it's possible. Otherwise you won't get security updates or new releases.
– papukaijaMar 14 '11 at 20:52

1

@papukaija Commenting on everyone's answer and telling them your way is better Is The Wrong Way To Do Things around here. Make your answer, let the community judge it. Fwiw, you have a good solution, you just need to post it as an answer instead of a bazillion comments.
– djeikybMar 18 '11 at 0:22

4

So you think it's a good idea to not let people to know that their suggestion is insecure? Really, the question isn't if my supported way (no, I haven't even suggested firefox-next ppa first) is better than others, but how to do things securely and efficiently.
– papukaijaMar 22 '11 at 20:54

1

@papukaija -- Updates work correctly if you're installing in your own directory for a single user. That being said, it looks like the ppa is now up-to-date for 4.0, so I would encourage anyone to use that as the preferred method.
– belacquaMar 25 '11 at 23:27

1

This is the only way that works if you are using an older version of ubuntu (because the community has abandoned your particular video card for example...grrr..). Downvoters should realize that not everyone is on the lastest version of ubuntu.
– srboisvertApr 27 '11 at 18:48