How can I compile Midori (with granite) to use WebKit2 instead of WebKit?

2 Answers 2


Open up Terminal and do the following things:

  1. Make sure you have the necessary dependencies to compile it. apt-get build-dep grabs almost everything from packaging, but you'll need to manually get WebKit2Gtk+

    sudo apt-get build-dep midori-granite
    sudo apt-get install libwebkit2gtk-4.0-dev
  2. Branch Midori's source code from Launchpad:

    bzr branch lp:midori
  3. Change into the midori folder you just branched and make a build directory. Then change into that directory. You don't need to make a separate build directory, but I recommend it because it makes it easy to "clean" the branch in case something goes wrong in your build and you want to try again.

    cd midori
    mkdir build
    cd build
  4. Configure CMake with the options necessary to build with Webkit2. If for whatever reason you're not interested in building with Granite, leave off the -DUSE_GRANITE part

  5. Make and test

  6. If everything seems to be great and you want to install:

    sudo make install

Keep in mind that elementary carries some additional Midori patches in Packaging, so you may notice some small differences (read: breakages). You can browse those patches here. Also keep in mind that Midori isn't currently being built with WebKit2 because there are a number of unsolved bugs. You can see known bugs here.


The blog post WebKitGTK+ 2.5.1: Good bye WebKit1 suggests how to build WebKitGTK+ 2 (if it's not already installed / available):

cd webkitgtk

Linux from Scratch has instructions for building Midori with a switch for WebKitGTK+ 2 support. And Midori itself offers info on how-to build with Granite support (-DUSE_GRANITE=1). So putting both together I come up with this:

cd midori
mkdir build &&
cd    build &&

      -DCMAKE_BUILD_TYPE=Release  \
      -DUSE_ZEITGEIST=OFF         \
      -DUSE_GTK3=1                \
      -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/midori-0.5.11 \
      -DUSE_GRANITE=1             \
      ..  &&

You could try this and report back. What's the worst that could happen? (I'd suggest using a virtual machine, as I have no idea...)

Please note, I have used checkinstall instead of make install to (hopefully) make it easier to get rid of everything again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.