All the coders out there, it’s for some bug fixing. So let’s take up Mozilla Organization and try to fix some bugs in Firefox Browser.

Wouldn’t it be awesome if we could contribute to our favorite browser and next time when we use it, we can be proud to say that this particular feature or code was added by me. Well this is the beauty of Open Source, you can contribute to your favorite application that you use regularly and add some cool features to it. But before that there are certain things that you need to keep in mind like cloning the repository, building it and then searching for bugs reported or report a new bug; Then creating patch, testing, and last but not the least submitting the patch for review. If the reviewer or the maintainer thinks that it is working and good enough it will be merged into the master repository and you can see the changes would be applied in the future updates.

Let’s begin with Building Firefox (mozilla-central). Here I will be posting about building it in Ubuntu 12.04 LTS
(You can also do it in different Linux Distros, but the packages required would differ from distro to distro)

For Building it on MAC OS X, please visit here and also here.

1. Run these script inorder to install the dependencies. For more info click here.

sudo apt-get update


sudo apt-get install zip unzip mercurial g++ make autoconf2.13 yasm libgtk2.0-dev libglib2.0-dev libdbus-1-dev libdbus-glib-1-dev libasound2-dev libcurl4-openssl-dev libiw-dev libxt-dev mesa-common-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libpulse-dev libpulse-ocaml-dev


aptitude install zip mercurial libasound2-dev libcurl4-openssl-dev libnotify-dev libxt-dev libiw-dev libidl-dev mesa-common-dev autoconf2.13 yasm libgtk2.0-dev libdbus-1-dev libdbus-glib-1-dev python-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

2. Now create a folder named ‘mozilla-central’

mkdir mozilla-central; cd mozilla-central

3. Clone the repository using

hg clone

or also you can download the latest bundle from here, as there are chances that the hg clone might be interrupted due to poor internet connection.

Follow the steps from 3(a) to 3(c) if you are using hg bundle.

3(a). You need to initialize the folder mozilla-central as a hg repository inorder to carry out further instructions. Run this:

hg init

3(b). After Downloading the bundle you need to unbundle it inside mozilla-central folder. You can do this by using:

hg unbundle /path/to/your/bundle.hg

3(c). After unbundling the hg bundle you need to add the path of the remote repository (i.e. online path to the repository to pull and update the files)

vim .hg/hgrc

(You can use any text editor as you wish, like gedit,kate,etc.) and paste this inside it and save it.

default =

4. Now you need to pull the latest files from the remote repository and update your local repository(files). You can achieve this by running:

hg pull; hg update

5. After the update is done you need to build it now by running

./mach build

It can take time ranging from 30 minutes to 90 minutes depending upon your computer’s configuration and also if you are using virtualization (virtualbox, VMWare, etc.)

6. Inorder to run the build (i.e. Firefox Browser, a.k.a “Nightly”) you need to close Firefox browser if it is already running in the backgroud and run this command:

./mach run

Note: Here I have combined two or more commands in one line separated by a semi-colon ‘;’ inorder to execute the commands one after the another so that you don’t need to wait for one process to finish and then go on to next command as it can take lot of time and we don’t have all the time in the world. To make the work easier we can use this method wherever possible. But remember you can execute each command separately, so don’t hesitate to try out things on your own 🙂

Happy Hacking \m/

Let the Windows be open, and feel the Freedom.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s