Open Source

In this article i will explain how to build and configure Mozilla to make your contribution. Mozilla  is a non profit organization. It is open Source. So any one can download source code and make changes or fixes bug and upload it.

So here i will explain you where to download and how to build Mozilla-central. So that you can start contributing to Mozilla.

Before installing mozilla-central source code you need to  Build Prerequisites. Because i am going to demonstrate this article in Unix/Linux, so i will give you Unix/Linux command and also i will provide link for the other OS too.

Build Tools and Dependencies.

One line Bootstrap Command. Open your terminalalt+ctrl+t. And just copy past the following command.

wget && python


You can download and install all the prerequisites with the following command.

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

For other Operating Systems.

Now you have done all prerequisites and you can proceed to download the mozilla source code and build.

You can download source file either using mercurial or direct download. Depend on your Internet connection. This may take a while.

Download using mercurial

hg clone

Direct Download from mozilla-central   or browse and locate the mozilla-central.hg file and click to download from here . These are some repositories where bundles are up to date.

Procedure to build source code.

  • 1. Initialize a new repository. mozilla-central is the repository i have created. This is not mandatory to create in the same name, but it will be good to use the same name, if you have configured mozilla’s other bundles.

    mkdir mozilla-central

    hg init mozilla-central

    After this your mozilla-central directory has .hg hidden files.

  • 2. Un-bundle the downloaded mozilla-central bundle into you repository.

    cd mozilla-central

    hg unbundle ./path/to/your/mozilla-central.hg

    So now you have unbundled you bundle into you repository.

  • 3. Add the following lines to mozilla-central/.hg/hgrc file.

    By default you don’t have the hgrc file in the .hg directory. so first create hgrc file(which is normal text file.) inside .hg directory and add the following lines into the file.


    default =

  • 4. Update your repositor.

    This will pull all the changes that are made, once you run this command your source code now up to date.

    hg pull

  • 5.Check out a working copy from your new up to date repository.

    hg up or hg update

    Now you have done all the necessary things to be done before building the source code. You are ready to build mozilla-central source code.

  • 6. Build mozilla-central

    ./mach build

    This will take time depend on you system speed, So take a tea break and come back after some time to continue the last step. Some time you need to run the build command twice, first time it will take only very few seconds (about 2 minutes or less), once run the same command it will take time.

  • 7. Check the firefox that you build from source code .


    mozilla-centralrepository you have created. , obj-....-linux-gnutab to complete it. only one file in that name. It may be different for every user.

    Now your firefox opens. That’s it, You have build mozilla-central. Now start contributing to firefox.


Leave a Reply

Your email address will not be published. Required fields are marked *

clear formPost comment