HOWTO: Compile Midori From Source In Ubuntu

UPDATE: If you want Midori but don’t care for the building, there’s now a Midori PPA for that.

Midori Logo HalfUbuntu Logo CircleOnly Half You know you want to do it. You know your friends want to do it. You’ve heard stories of people that have done it. We’ve all wanted to do it — compile a program from source. One of the ultimate goals of any geek to own a computer, compiling a program from source just gives you that geek street cred you’ve always wanted. Now you can have it!

I’m going to show you how to get the Midori browser from source. Midori is a project is headed up by Christian Dywan over at I don’t what has happened, but the version packaged up in the Ubuntu repositories is sorely out-of date at v0.0.18. Midori went 0.1.0 on October 2008.

If you want to build from source, you’re going to need to get used to dev packages. If you’ve ever browsed through the Synaptic Package Manager, you may have noticed something along the lines of package.a followed by a package.a-dev. Those -dev packages are usually the source files. If you don’t see them, go to System > Administration > Software Sources and be sure that you have the box next to Source Code checked.

We’re also going to need a more recent version of the webkit libraries than what’s in the main Ubuntu repositories. That’s where Canonical’s Launchpad comes into play. Launchpad is a place for people to collaborate over code, and is often used to package up more recent versions of the packages shipped with Ubuntu.

First we’ll add the Launchpad’s Webkit Team’s PPA repository to Apt:

sudo echo deb jaunty main >> /etc/apt/sources.list
sudo echo deb-src jaunty main >> /etc/apt/sources.list
sudo apt-key adv --recv-keys --keyserver 612d9fe65c733a79bb2ab07d991e6cf92d9a3c5b

Next, we need to refresh Apt’s package list

sudo apt-get update

Now we’ll install all the dependencies we need (and some optional ones)

sudo apt-get install intltool libgettext-ruby-util libglib2.0-dev libgtk2.0-dev libidn11-dev libsqlite3-dev libunique-dev libwebkit-dev rst2man

Now we need to get Midori’s source code and extract it:

cd /usr/src
sudo wget
sudo tar xjf midori-0.1.6.tar.bz2

Now it’s time to build!

cd /usr/src/midori-0.1.6
sudo ./waf configure

At this point you may notice the optional hildon package has failed. DON’T INSTALL THIS IF YOU ARE USING GNOME OR KDE! You’ll be missing your menu bar and your main toolbar will be at the bottom if you do.

sudo ./waf build

If all goes according to plan, way to go! One more step to go.

sudo ./waf install

If you ever want to build again, you’ll need to run this command before you start the configure-build-install routine.

sudo ./waf clean

Congratulations! You just compiled a web browser from source!

About these ads