Introduction to WebKitGTK

The WebKitGTK package is a port of the portable web rendering engine WebKit to the GTK+ 3 and GTK 4 platforms.



Development versions of BLFS may not build or run some packages properly if dependencies have been updated since the most recent stable versions of the book.

Package Information

  • Download (HTTP): https://webkitgtk.org/releases/webkitgtk-2.36.8.tar.xz

  • Download MD5 sum: 7a3f19f4ff9e8de8c4ab2707e2d350f5

  • Download size: 25 MB

  • Estimated disk space required: 988 MB (133 MB installed)

  • Estimated build time: 43 SBU (using parallelism=4, estimated 150 SBU using one core)

WebKitGTK Dependencies


Cairo-1.17.6, CMake-3.25.0, gst-plugins-base-1.20.4, gst-plugins-bad-1.20.4, GTK+-3.24.34, ICU-72.1, Little CMS-2.14, libgudev-237, libsecret-0.20.5, libsoup-2.74.3, libtasn1-4.19.0, libwebp-1.2.4, Mesa-22.2.4, OpenJPEG-2.5.0, Ruby-3.1.3, SQLite-3.40.0, Which-2.21, and wpebackend-fdo-1.14.0



bubblewrap-0.7.0, GTK-Doc-1.33.2, GTK-4.8.2, HarfBuzz-5.3.1, Wayland-1.21.0, WOFF2-1.0.2, ccache, Hyphen, libavif, libmanette, and xdg-dbus-proxy

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/webkitgtk

Installation of WebKitGTK

Installation of WebKitGTK

Install WebKitGTK by running the following commands:

mkdir -vp build &&
cd        build &&

cmake -DCMAKE_BUILD_TYPE=Release  \
      -DCMAKE_SKIP_RPATH=ON       \
      -DPORT=GTK                  \
      -DLIB_INSTALL_DIR=/usr/lib  \
      -DUSE_LIBHYPHEN=OFF         \
      -DENABLE_GAMEPAD=OFF        \
      -DUSE_WOFF2=OFF             \
      -DUSE_SOUP2=ON              \
      -DUSE_WPE_RENDERER=ON       \
      -Wno-dev -G Ninja ..        &&

This package does not have a working testsuite. However, there is a usable basic graphical web browser in the build directory, build/bin/MiniBrowser. If launching it fails, there is a problem with the build.

Now, as the root user:

ninja install &&

install -vdm755 /usr/share/gtk-doc/html/webkit{2,dom}gtk-4.0 &&
install -vm644  ../Documentation/webkit2gtk-4.0/html/*   \
                /usr/share/gtk-doc/html/webkit2gtk-4.0       &&
install -vm644  ../Documentation/webkitdomgtk-4.0/html/* \

Command Explanations

-DUSE_LIBHYPHEN=OFF: This switch disables the default automatic hyphenation implementation. You need to install Hyphen if you wish to enable it (replacing OFF with ON or just removing the switch).

-DENABLE_GAMEPAD=OFF: This switch disables gamepad support. Remove this switch if you have libmanette installed and wish to enable it.

-DENABLE_MINIBROWSER=ON: This switch enables compiling and installing the MiniBrowser.

-DUSE_WPE_RENDERER=ON: This switch uses the WPE renderer, which is recommended by upstream.

-DENABLE_BUBBLEWRAP_SANDBOX=OFF: Remove this switch if the optional packages bubblewrap-0.7.0 and xdg-dbus-proxy are installed.

-DUSE_LIBNOTIFY=OFF: Use this switch if you do not have libnotify installed.

-DUSE_SYSTEM_MALLOC=ON: This switch enables building against the system installed malloc.

-DENABLE_GEOLOCATION=OFF: Use this switch if you don't want to install GeoClue-2.6.0.

-DENABLE_GTKDOC=ON: Use this switch if GTK-Doc-1.33.2 is installed and you wish to rebuild and install the API documentation.

-DUSE_WOFF2=ON: Use this switch if the optional package WOFF2-1.0.2 is installed. This adds additional support for fonts.


Installed Program: WebKitWebDriver
Installed Libraries: libjavascriptcoregtk-4.0.so and libwebkit2gtk-4.0.so
Installed Directories: /usr/include/webkitgtk-4.0, /usr/lib{,exec}/webkit2gtk-4.0, and /usr/share/gtk-doc/html/webkit{2,dom}gtk-4.0

Short Descriptions


allows debugging and automation of web pages and browsers


contains core JavaScript API functions used by jsc and libwebkit2gtk-4.0


contains the WebKit2 API functions