Building Moblin Web Browser 2: Electric Boogaloo

I get mailed about it on a semi-regular basis, so the following is an updated version of the guide I wrote before on building Moblin Web Browser. Note that many things have changed since the last guide, so if you gave it a go then and weren’t impressed (or even if you were), I’d recommend giving it another try! I’ll try to keep this updated.

Some notes

I’m going to assume that you build all of this in $HOME/moblin and that you’re ok with mozilla living in /opt/mozilla-headless (trust me, it’s for the best). I’m also going to assume that you have a system already setup for developing GNOME/Gtk applications. And that you have Mercurial and Git installed. You’ll also need to install autoconf2.13 if you don’t already have it. For those with non-debian systems without sudo setup, replace ‘sudo [stuff]’ with ‘su -c “[stuff]”‘ (or setup sudo).

Step 1

Checking out the source

cd ~/moblin
git clone git://git.clutter-project.org/clutter
git clone git://git.clutter-project.org/clutter-gtk
git clone git://git.clutter-project.org/clutter-mozembed
git clone git://anongit.freedesktop.org/ccss
git clone git://git.moblin.org/clutter-imcontext
git clone git://git.moblin.org/nbtk
git clone git://git.moblin.org/mozilla-headless-services
git clone git://git.moblin.org/moblin-web-browser
hg clone http://hg.mozilla.org/incubator/offscreen mozilla-headless

You may also need a check-out of libunique; instructions here.

Step 2

Building Clutter

cd ~/moblin/clutter
git checkout -t origin/clutter-1.0
./autogen.sh
make
sudo make install cd ~/moblin/clutter-gtk
git checkout -t origin/clutter-gtk-0.10
./autogen.sh
make
sudo make install cd ~/moblin/clutter-imcontext
./autogen.sh
make
sudo make install

Note that if you want documentation, all three of these accept ‘–enable-gtk-doc’ as a configure parameter. These should all install in /usr/local by default, you should check that this is setup in /etc/ld.so.conf.d, and you may need to run ‘sudo ldconfig’ after installation.

Step 3

Building Nbtk

cd ~/moblin/ccss
git checkout libccss-0.3.1
./autogen.sh –without-rsvg –without-soup –disable-ccss-cairo –disable-ccss-gtk –disable-examples
make
sudo make install cd ~/moblin/nbtk
./autogen.sh
make
sudo make install

Note about documentation still applies. You can get nicer build output from libccss by specifying ‘–enable-shave’ too (used by Clutter and co by default), and if you’re a developer, you may also want ‘–enable-debug’.

Step 4

Building Mozilla

Download this file to your home directory before starting.

cd ~/moblin/mozilla-headless
hg checkout headless
make -f client.mk configure
cd ../mozilla-build
make
sudo mkdir /opt/mozilla-headless
sudo chown $USER:$USER /opt/mozilla-headless
make SKIP_GRE_REGISTRATION=1 install

Now, this is the slightly less straight-forward bit. You’ll either need to add a file to /etc/ld.so.conf.d to add ‘/opt/mozilla-headless/lib/xulrunner-1.9.3a1pre/’ and ‘/opt/mozilla-headless/lib/xulrunner-devel-1.9.3a1pre/’ to your default library search path, or you’ll need to alter your environment to add them to your $LD_LIBRARY_PATH. I’d recommend the latter, and doing it in your ~/.bashrc, making it easier if something goes wrong.

You’ll also need to add ‘/opt/mozilla-headless/lib/pkgconfig/’ to your $PKG_CONFIG_PATH. Again, I’d recommend doing this in your ~/.bashrc. Don’t forget to run ‘sudo ldconfig’ after installation, if necessary.

Step 5

Building ClutterMozEmbed

We’re almost there now 🙂 If you’ve followed all the previous steps correctly, it should all be downhill from here (in a good way).

cd ~/moblin/mozilla-headless-services
./autogen.sh –enable-gnome-proxy
make
sudo make install cd ~/moblin/clutter-mozembed
./autogen.sh –enable-plugins –enable-im
make
sudo make install

Again, the only slightly non-standard thing here is that mozilla-headless-services is a dbus daemon and you may need to setup your system for dbus service activation to work from the /usr/local prefix. Most distributions do this by default, but if yours doesn’t, have a look in /etc/dbus-1. If you can’t get that to work, you can run the daemon manually with ‘/usr/local/libexec/mhs-service’. Don’t forget ‘sudo ldconfig’!

Step 6

Building Moblin Web Browser

cd ~/moblin/moblin-web-browser
./autogen.sh –disable-netpanel
make
sudo make install

You should now just be able to run ‘moblin-web-browser’, although you may want to run ‘moblin-web-browser -w’ so that it doesn’t launch full-screen (and you may also want to alter the .desktop file to do this by default when launching from the applications menu). If you find any bugs that aren’t also present in Firefox on Linux, please file them over here (don’t forget to check for duplicates first!) Happy surfing 🙂

]]>

Leave a Reply

Your e-mail address will not be published. Required fields are marked *