Firefox OS/B2G gaia desktop builds:

Syndicator

Click to view slideshow.

As we count down towards to release of the much awaited “Firefox OS” aka “Boot 2 Gecko”, every one is eager to get a piece of the action. Now, as we wont be able to get the devices which will be running this magnificent OS or do not want to flash the Nexus’s and Samsung Galaxy’s to get a feel of what is Firefox OS all about; don’t be disheartened. You can get one of the desktop builds, either for Mac/Windows/Linux and experience the OS first hand.

Now, there are many places where you might be able to get the information as to how to run these desktop builds on various operating systems, especially on the official Mozilla b2g/gaia wiki. So the effort in these blog posts would be to simplify and demonstrate stepwise procedure as to how one can get started.

The following post is for anyone with Mac operating system. Subsequent posts will contain Windows and Linux tutorials as well.

Step 1: Check your system for all the requirements.

  • You will need to install the “Command line tools” in Xcode. Open Xcode –> “Preferences”
  • You will need “git” installed in your system: Git Setup

Step 2: It is recommended that you use a virtual environment for such tasks:

Virtual environments are isolated Python environments. They allow freedom to install specific versions of dependencies without affecting the global site-packages. They also make it easy to throw away a ‘broken’ environment and start again. If you need further information regarding virtual environments, please see the virtualenvwrapper documentation.

( Source: Mozilla wiki on Virtual env)

  • Open “terminal” from Applications.
  • Now, for installing any python packages you will need “pip
  • sudo easy_install pip    (This will install pip on your system).
  • sudo pip install virtualenvwrapper
  • In your root folder open your bash profile
    $vim .profile
  • Add the following in the file save and exit:
    export WORKON_HOME=$HOME/.virtualenvs
    source /usr/local/bin/virtualenvwrapper.sh
  • Run the following command:
    $source .profile
  • Now you are ready to make virtual profiles by:
    $mkvirtualenv <name_of_env>

Step 3: Cloning the B2G/Gaia Repository from git:

  • Now, once you are all set from above, clone the repository into desired folder:
    $ git clone git://github.com/mozilla-b2g/gaia

Step 4: Download the B2G app:

Step 5: Making the B2G/Gaia profile:

  • Once the B2G/Gaia repository is cloned, run the following command:
    $ DEBUG=1 make -C gaia profile

Step 6: Running the B2G/Gaia profile with the b2g.app:

  • When the profile is ready link the profile created in gaia folder to “b2g” located in b2g.app:
    Example: for me:
    My b2g.app was in a folder in desktop, while the gaia folder containing the profile was in my root.
    $ /Users/ajalgaonkar/Desktop/B2G/B2G.app/Contents/MacOS/b2g -profile /Users/ajalgaonkar/gaia/profile

Once that is done you are all set 🙂

For your convenience here is a short video demonstrating the exact steps written above for your convenience:

If you have any questions or concerns please leave a comment and I would do my best to answer them.

Thank you,

-Adi