Using the Mozilla build VM

If you ever wondered what contributing to Firefox feels like but you never had the time to read and follow through our instructions to setup a build environment or wanted to avoid making changes to your standard tools and configuration, then this might be for you. Mozilla provides a virtual machine (VM) which is compatible with the free VirtualBox virtualization software (as well as others, including VMWare/VMWare Fusion).

This article provides simple instructions for downloading, installing, and setting up this build environment build machine; once you've finished following the steps below, you'll have a VM ready for you to modify and tweak Firefox.

Hopefully this VM will especially help developers or potential developers who don't have a full C++ development environment available to them, as well as to experienced developers without the time to set up a build system following the usual instructions.

Installing VirtualBox

Visit the VirtualBox downloads page and download the latest version of the software for your operating system.

Note: If you already have a virtualization product installed, such as VirtualBox, VMWare, or VMWare Fusion, you can use that instead of downloading a new copy of VirtualBox. Just make sure you have the latest version of the software. Note that Parallels Desktop does not support the OVF format.

Downloading the VM

Next, download the Firefox development environment VM.

Download the VM

SHA-256: 1c84eaf97ea2a9a3c990051306a038da9541a450fd600878e7c1f984fa930f35

Note: This file is about 4.4 GB, so it may take a while to download.

Setting up the VM

After getting the virtual machines' .ova file has downloaded, double-click on it; this will start the process of importing the VM into VirtualBox. Please give the VM a minimum of 4096 MB of RAM (8192 MB or more if you can), and set it to have the same number of processors as your host computer. Building Firefox uses a lot of system resources, and you want it to build as quickly as possible.

Screen shot of the Import Virtual Appliance window

Once you've finished importing the VM, you can perform additional customizations if you wish, or just boot the VM and wait for the Ubuntu desktop to appear. A terminal window will pop up automatically and perform some final setup activities. Once those are finished running, Sublime Text will start up, and you can get to work!

Screen shot of the Sublime Text editor running in the VM

Note: If you ever need root credentials, use "firefox-dev" as the password. If you wish to change your language and keyboard settings, follow the instructions in How to change the UI language in Ubuntu.

Building Firefox

To build Firefox in the VM, open the Tools menu and choose the Build option. The build process will begin, and you have time for a drink, a nice meal, or possibly a short vacation, depending on how fast your computer is. You'll need to be patient.

Once the build has finished (successfully), choose the Run option in the Tools menu to start up your custom build of Firefox. Make sure everything works as expected.

By default, the VM is configured to build an optimized build of Firefox. You can easily switch to building for debugging. Simply open the Tools menu, then the Build System submenu within it. In the last of build systems that appears in the submenu, choose "Firefox (Debug)". That's it! Your next build will be a debugger build.

Screen shot showing how to switch between debug; and optimized builds

Working in the VM

From here out, you work in the VM just like you would anywhere else. To pull the latest code from mozilla-central, just use Mercurial as usual:

hg pull

And you submit your patches the same way you normally would.

Now what?

Now that you've successfully built Firefox in your brand-new VM, you might be wondering what to do next.  A great way to start is to pick a small, easy-to-fix bug and contribute code that patches it. Imagine how awesome it is to have code you wrote shipped to half a billion users all over the world!

Here are some links to help you find something you can do to make Firefox better:

  • Code Firefox Lessons provides a number of video tutorials for new Firefox contributors.
  • Bugs Ahoy! (a tool to help you find bugs that might interest you).
  • firefox-dev.tools (a tool to help you find bugs related to the Firefox Developer Tools that might interest you).
  • Developer guide (documentation about developing on and for Mozilla projects).
  • Mentored bugs have a mentor who commits to helping you every step of the way. Generally, there should be enough information in the bug to get started. Whenever you need help, contact the mentor over IRC, in the bug itself, or by email. When you've completed the bug, they will help you get your code into the tree.
  • "Good" first bugs may be a little stale, but at some point in their lives we considered that they would be a good first step for newcomers to Mozilla. We are in the process of migrating these bugs to mentored bugs, but more recent "good first bugs" may be good starting points if there are no appropriate mentored bugs.
  • How to submit a patch (information about how to create a patch file and get it submitted into the source code).

You can also ask your getting-started questions in #introduction, and any Firefox development questions in #developers.

Document Tags and Contributors

 Contributors to this page: ttaubert, Sebastianz, Sheppy, mhoye_moz, zlailari, jp.jeaphil, AlexPl
 Last updated by: ttaubert,