Installing Multiple Versions of Firefox Including Multiple Profiles

May 1, 2015, 9 p.m.

Nearly all distributions make Firefox available through their default repositories. Some also make the beta, developer, and nightly editions available through non-default repositories. For distributions that don't provide these editions, or for distributions that make only one or some of the other editions available -- in the case of openSUSE, only the developer edition is available through the Mozilla OBS repository -- it is possible to install Firefox Beta and/or Firefox Developer Edition manually. It is even possible to create separate profiles for each edition and select the profile to use when launching any of the editions. This article will provide a guide for installing one of the editions of Firefox manually.

Introduction

The AUR (Arch User Repository) provides makes binary packages of Firefox Beta and Firefox Developer Edition available, making it simple for users of Arch based distributions to install and update these release channels. Pure Arch users will have to go through an inconvenient process to be able to use the AUR.

Users of other distributions have some options for installing the non-stble release channel editions of Firefox, but these are not as good as those available to those with access to the AUR. For example, Ubuntu has two Mozilla PPAs -- Firefox and Thunderbird Daily Builds PPA and Official PPA for Firefox Beta, but unfortunately, installing from one of these PPAs will replace an existing installation of the stable release channel Firefox. And openSUSE provides a Mozilla openSUSE Build Service repository which distributes the Developer Edition and the Extended Support Release versions of Firefox.

The Firefox Profile Manager.
Firefox Profile Manager.
Starting Firefox with the --ProfileManager opens the Profile Manager
The Firefox Profile Manager.
Firefox Profile Manager.
Starting Firefox with the --ProfileManager opens the Profile Manager

But what if openSUSE users want Firefox Beta and Ubuntu users want Firefox Beta and Firefox Developer Edition without replacing the default installation of Firefox? The solution is to install these editions manually. The rest of this article will describe the process of installing Firefox Beta manually in an openSUSE Tumbleweed system where Firefox (stable release channel) is already installed by default by the openSUSE installer and Firefox Developer Edition is already installed from the OBS Mozilla repository.

Download

All release channel versions of Firefox can be downloaded from Mozilla's Firefox Channels page as tar.bz2, archives.

The Firefox Channels download page.
The Firefox Channels download page.
The stable, beta, and developer editions of Firefox can be downloaded from this page, as well as the Android version.

The top level folder name in the archive will be called firefox regardless of the edition downloaded.

Install

  1. Extract the downloaded tar.bz2 archive to /opt/. In a terminal navigate to the directory containing the download and execute:
    tar -xvjf firefox-45.0b10.tar.bz2 -C /opt/
    This will create the directory /opt/firefox/ containing the installation.
  2. Rename the folder to firefox-beta
    mv /opt/firefox/ /opt/firefox-beta/
  3. Create a symlink in /usr/bin/ to the firefox binary/script in /opt/firefox-beta with
    ln -sf /opt/firefox-beta/firefox /usr/bin/firefox-beta
  4. Now that it is installed, launch Firefox Beta in a terminal with the --ProfileManager option.
    firefox-beta --ProfileManager
    The --ProfileManager option will open the Firefox profile manager dialog, allowing selection of existing Firefox profiles or creation of a new profile.
    The Firefox Profile Manager.
    Firefox Profile Manager.
    Starting Firefox Beta with firefox-beta --ProfileManager opens the Profile Manager
  5. Create a new profile for use with the newly, manually installed edition of Firefox by clicking on the Create Profile ... button in the Firefox profile manager, shown in the above screenshot. The Create Profile Wizard will then open.
    Create Profile Wizard Screen 1.
    The first screen of the Create Profile Wizard.
    The wizard helps to create a new Firefox profile.
    Create Profile Wizard Screen 2
    The second screen of the Create Profile Wizard.
    The name of the new profile can be specified here, as well as the location of the profile.
    The Firefox Profile Manager.
    The third screen of the Create Profile Wizard.
    Since I want to use this profile with Firefox Beta, I named it firefox-beta.
  6. Create a desktop file named firefox-beta.desktop in /usr/bin/applications for the new installation, either by copying an existing desktop file for another edition of Firefox or from scratch. I copied the existing desktop file from the default installation of Firefox. In the following code block, which shows the new desktop file, I changed the values as follows from the original desktop file:
    • Name to Firefox Beta
    • TryExec to firefox-beta
    • Exec to firefox-beta -P firefox-beta %u from firefox %u. The -P option starts Firefox Beta with the argument of the option, the name of the newly created profile. Without this option since there are multiple Firefox profiles, Firefox Beta would start with the profile manager.
    • Icon to firefox-beta. If the icon set includes a specific icon for Firefox Beta, that would be used instead of the one for Firefox.
    • private window Exec to firefox-beta -P firefox-beta --private-window %u
    The final desktop file is reproduced in the following code block.
    
    [Desktop Entry]
    Categories=Network;WebBrowser;GTK;
    Encoding=UTF-8
    Name=Firefox Beta
    GenericName=Web Browser
    Comment=Web Browser
    TryExec=firefox-beta
    Exec=firefox-beta -P firefox-beta %u 
    Icon=firefox-beta
    Terminal=false
    StartupNotify=true
    MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;application/x-xpinstall;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
    Type=Application
    
    Actions=PrivateBrowsing;
    
    [Desktop Action PrivateBrowsing]
    Name=New Private Browsing Window
    Exec=firefox-beta -P firefox-beta --private-window %u
    

The above process will add Firefox Beta to the system and when launched it will use the profile specified by the -P option in the Exec lines of the desktop file. If you want to select from the available exiting profiles instead, change the Exec line to

firefox-beta --ProfileManager firefox-beta %u

Other options can be viewed with firefox-beta --help.

Other useful additions to the desktop file are possible in a more standard version of a desktop file for Firefox which the openSUSE packagers didn't provide. Looking at the Firefox desktop file in my Manjaro installation, there are also the entries:


[Desktop Action NewTab]
Name=Open new tab
Exec=firefox -new-tab about:newtab
		

[Desktop Action NewWindow]
Name=Open new window
Exec=firefox -new-window
		

If either of these actions are included in the desktop file, the Actions value has to be modified to include the entries, for example if both of these are added the Actions line would be:

Actions=PrivateBrowsing;NewTab;NewWindow;
Various Files Created by the Firefox Manual Installation
The /usr/share/applications showing the firefox desktop files, and the properties of the Firefox files in /usr/bin.

You should also be sure to modify the desktop files of existing Firefox installations to launch with the profile you want for that installation, or at least modify them to launch with the profile manager. You should also be aware of the profiles.ini file which controls some profiles related behavior of Firefox. In my openSUSE Tumbleweed system it is at /home/brook/.mozilla/firefox/profiles.ini created by the first default installation of the standard Firefox. There are settings in this file that specify that any Firefox should be launched with the last used profile and that specify the default profile.

About Firefox Window and Troubleshooting Information
About Firefox Window, Troubleshooting Information.
The troubleshooting tab can be opened from Main Menu>>Help>>Troubleshooting Information. Clicking the Open Directory button in the Profile Directory entry on the Troubleshooting Information tab will open the directory where the profile in use is located.

Conclusion

For Linux users who want to install multiple editions -- even with multiple profiles -- but use distributions that don't provide packages for the non-stable channels, it is possible to manually install the other editions. The one drawback of this method is that, if installed in /opt or any non-user directory, automatic updates are not possible; a new version must be downloaded and copied over the exiting version in the installation directory.