How to install Firefox Developer Edition on Linux

The “developer edition” is a special version of the Mozilla Firefox web browser tailored for web developers. It has features stabilized in nightly builds, provides experimental developer tools, and it is configured for development, so some options as remote debugging, are enabled by default.

The browser creates and uses a separate profile, so it can be used together with the standard edition of Firefox (on Linux, profiles are created inside the ~/.mozilla directory).

In this tutorial we will see how to install Firefox Developer Edition on Linux, how to add the application to our PATH, and how to create a desktop launcher for it: the instructions can be applied to any Linux distribution.

In this tutorial you will learn:

  • How to download and install Firefox developer edition
  • How to add the Firefox binary to PATH
  • How to create a launcher for the application


firefox-logo

The Firefox developer edition.

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Distribution-independent
Software
  • Curl
  • Tar
Other Following this tutorial does not require any specific requirement
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Fetching the Firefox developer edition tarball

Firefox developer edition is distributed by Mozilla in a portable format and comes packaged in a tarball (all its
dependencies are also contained in the tarball). We can download the tarball directly from the Firefox Browser Developer Edition Website.



firefox-download-page

Firefox developer edition download page

The appropriate version and language for our system should be automatically detected when we click on the download button. In case we want to download an alternative version, all we have to do is to manipulate parameters of the download URL:

https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US

Say for example we want to download the 32bit version of the application: all we have to do is to change the value of the os parameter from linux64 to linux. To change the application language, instead, we would pass the appropriate value to the lang parameter: to download the Italian version, for example, we would use the following URL:

https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=it


We can download the application also from the command line, using the curl utility; if we combine it with tar via a pipe, we can extract the tarball “on the fly”. All we have to do is to run the following command:

$ curl --location
"https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US" \
  | tar --extract --verbose --preserve-permissions --bzip2

We invoked curl using the --location option which is needed to make curl follow redirections, and providing the download URL. If not otherwise specified, curl writes its output to stdout (standard output), so we use a pipe | to redirect said output and use it as the standard input (stdin) of the tar application.

We used the latter with some options: --extract
to perform an extraction, --verbose (optional) to make the name of the extracted files be printed on the terminal when they are extracted, --preserve-permissions to preserve the files permissions, and --bzip2 to specify how the tarball should be decompressed. If everything go as planned, in the directory from which we executed the command, we will find a new “firefox” directory.



Installation

The next step consists into placing the Firefox directory somewhere more appropriate in our filesystem. In this tutorial we will install the application for our user only. By convention, self contained, global-installed applications are placed in the /opt directory. There is not a standard per-user equivalent of this directory, so we will arbitrarily use ~/.local/opt as destination. The directory doesn’t exist by default, therefore we must create it:

$ mkdir -p ~/.local/opt

We can then move the application directory:

$ mv firefox ~/.local/opt

Adding the Firefox binary to our PATH

At this point, the Firefox developer edition binary should be now  ~/.local/opt/firefox/firefox. For convenience we want to add this binary to our PATH. The value of the PATH variable is a series of directory names separated by a :, where applications are searched by default when they are invoked without specifying their absolute location. To check the content of the variable we can simply expand it:



$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/egdoc/.local/bin

You can see that the /home/egdoc/.local/bin directory is appended to my PATH. This .local directory is created inside each user’s home directory, and it’s meant to contain per-user executables.

To add it to our
PATH, we can simply append the following line in our .bash_profile or .profile file, depending on the shell we are using (.bash_profile is used by the bash shell, which uses .profile has a fallback if it doesn’t exists):

PATH=${PATH}:"${HOME}/.local/bin"

The file is sourced when we use an interactive login shell, so to make the changes effective we must logout and login
again. At this point we must create a symbolic link to the Firefox developer edition binary inside the ~/.local/bin directory. We will name the link firefox-dev in order to distinguish it form the standard Firefox binary:

$ ln -s ~/.local/opt/firefox/firefox ~/.local/bin/firefox-dev

We should now be able to launch the application from our terminal:

$ firefox-dev


Creating a desktop launcher

Another thing we may want to do is to create a .desktop launcher,  in order to integrate the application in our desktop environment application launcher. The directory which hosts per-user desktop launchers is ~/.local/share/applications. Inside of it we must create the firefox-dev.desktop file and place this content inside of it:

Name=Firefox Developer Edition
GenericName=Web Browser
Exec=/home/egdoc/.local/bin/firefox-dev %u
Icon=/home/egdoc/.local/opt/firefox/browser/chrome/icons/default/default128.png
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;
StartupWMClass=Firefox Developer Edition

[Desktop Action new-window]
Name=Open a New Window
Exec=/home/egdoc/.local/bin/firefox-dev %u

[Desktop Action new-private-window]
Name=Open a New Private Window
Exec=/home/egdoc/.local/bin/firefox-dev --private-window %u


Let’s briefly take a look at the file content. The Name key is used to specify the application name and is mandatory. The GenericName key, instead, is used to specify a generic name for the application and is optional.

The Exec key is used to point to the program which should be invoked by the launcher, in this case /home/egdoc/.local/bin/firefox-dev. The Icon key, is used to specify the launcher icon, while Terminal  is used to specify whether the program runs inside a terminal window or not. The Type entry is used to specify the desktop entry type: it must be one among “Application”, “Link” or “Directory”.

To specify a list of the MIME types supported by the applications we use the MimeType key and separate the entries with a semicolon.

When the StartupNotify key is set to true, the cursor notifies the user when the application is started. When the application appears onscreen, the cursor returns to its original form (the application must support startup notifications).

The Categories key is used to specify in which entries the application should be displayed in the menu, while Keywords is used to specify a series of words separated by semicolon to be used as metadata for the application and facilitate its search.



The Actions key is used to define separate actions other than the default one. Those actions can be chosen from the menu that appears when we right-click on the launcher and are then defined separately in their own sections, in this case [Desktop Action new-window] and [Desktop Action new-private-window]. The former is identical to the default one; the latter launches a private session by invoking the binary with the --private-window option.

Desktop launcher right-click menu
Desktop launcher right-click menu

Finally, the StartupWMClass entry is used to define in which class the application is grouped the

launcher menu. If we omit this key, we may find two entry of the desktop launcher: the one we clicked upon to launch the application, and the one which references the opened application.

Conclusions

In this tutorial we learned how to download and install Firefox developer edition, a version of Firefox tailored to web developers, which contains additional features not already ported to the standard version. We learned how to download and extract the tarball containing the application files, how to install it, how to add it to our PATH, and how to create a desktop launcher for the application.



Comments and Discussions
Linux Forum