Introduction to GTK+ 3

The GTK+ 3 package contains libraries used for creating graphical user interfaces for applications.

This package is known to build and work properly using an LFS-11.2 platform.

Package Information

GTK+ 3 Dependencies


at-spi2-atk-2.38.0, gdk-pixbuf-2.42.9, libepoxy-1.5.10, and Pango-1.50.9


Recommended (Required if building GNOME)


colord-1.4.6, Cups-2.4.2, DocBook-utils-0.6.14, GTK-Doc-1.33.2, PyAtSpi2-2.38.2 (for tests), and PAPI

User Notes:

Installation of GTK+ 3

Install GTK+ 3 by running the following commands:

./configure --prefix=/usr              \
            --sysconfdir=/etc          \
            --enable-broadway-backend  \
            --enable-x11-backend       \
            --enable-wayland-backend   &&

Some tests fail if /usr/share/glib-2.0/schemas/gschemas.compiled is not found. If you wish to run the test suite, create (or update) the file using the following command as the root user: glib-compile-schemas /usr/share/glib-2.0/schemas.

To test the results you need a graphical session, then issue make check. Several tests associated with scrolledwindow are known to fail.

Now, as the root user:

make install


If you installed the package on to your system using a c DESTDIR method, an important file was not installed and must be copied and/or generated. Generate it using the following command as the root user:

gtk-query-immodules-3.0 --update-cache


If you installed the package to your system using a DESTDIR method, /usr/share/glib-2.0/schemas/gschemas.compiled was not updated/created. Create (or update) the file using the following command as the root user:

glib-compile-schemas /usr/share/glib-2.0/schemas

Command Explanations

--enable-broadway-backend: This switch enables the HTML5 GTK backend.

--enable-x11-backend: This switch enables the X11 GDK backend.

--enable-wayland-backend: This switch enables the Wayland GDK backend. Replace with --disable-wayland-backend if you do not have Wayland-1.21.0 and wayland-protocols-1.26 or you do not wish to build GNOME with Wayland support. Other changes may be needed to allow the build to complete without the wayland backend enabled. Note that a previous installation of gtk+3 built with wayland will interfere with installation without wayland. If this is desired, remove /usr/lib/libgtk-3* before installation.

--enable-gtk-doc: Use this parameter if GTK-Doc is installed and you wish to rebuild and install the API documentation.

Configuring GTK+ 3

Config Files

~/.config/gtk-3.0/settings.ini and /etc/gtk-3.0/settings.ini

Configuration Information

GTK+ 3 themes change the way a GTK+ 3 application looks. An icon theme can be used to change the icons that appear on the application's toolbar. If you have installed a GTK+ 3 theme (e.g. the Adwaita theme built in GTK+ 3), an icon theme (such as oxygen-icons5-5.97.0) and/or a font (Dejavu fonts), you can set your preferences in ~/.config/gtk-3.0/settings.ini, or the default system wide configuration file (as the root user), in /etc/gtk-3.0/settings.ini. For the local user an example is:

mkdir -vp ~/.config/gtk-3.0
cat > ~/.config/gtk-3.0/settings.ini << "EOF"
gtk-theme-name = Adwaita
gtk-icon-theme-name = oxygen
gtk-font-name = DejaVu Sans 12
gtk-cursor-theme-size = 18
gtk-toolbar-style = GTK_TOOLBAR_BOTH_HORIZ
gtk-xft-antialias = 1
gtk-xft-hinting = 1
gtk-xft-hintstyle = hintslight
gtk-xft-rgba = rgb
gtk-cursor-theme-name = Adwaita

There are many settings keys, some with default values. You can find them at Settings: GTK+ 3 Reference Manual. There are many more themes available at and other places.

As part of GTK+-3.0's redesign, the scroll bar buttons are no longer visible on the scrollbar in many applications. If this functionality is desired, modify the gtk.css file and restore them using the following command:

cat > ~/.config/gtk-3.0/gtk.css << "EOF"
*  {
   -GtkScrollbar-has-backward-stepper: 1;
   -GtkScrollbar-has-forward-stepper: 1;


Installed Programs: broadwayd, gtk3-demo, gtk3-demo-application, gtk3-icon-browser, gtk3-widget-factory, gtk-builder-tool, gtk-encode-symbolic-svg, gtk-launch, gtk-query-immodules-3.0, gtk-query-settings, and gtk-update-icon-cache
Installed Libraries:,, and
Installed Directories: /etc/gtk-3.0, /usr/include/{gail,gtk}-3.0, /usr/{lib,share}/gtk-3.0, /usr/share/gtk-doc/html/{gail-libgail-util,gdk,gtk}3, and /usr/share/themes/{Default,Emacs}/gtk-3.0

Short Descriptions


provides support for displaying GTK+ 3 applications in a web browser, using HTML5 and web sockets


is a simple program that demonstrates some of the tasks that can be done with GTK+ 3


is a simple GTK+ 3 application


is a utility to explore the icons in the current icon theme. It shows icons in various sizes, their symbolic variants where available, as well as a description of the icon and its context


is a program to view GTK+ 3 themes and widgets


performs various operations on GtkBuilder .ui files


converts symbolic SVG icons into specially prepared PNG files. GTK+ 3 can load and recolor these PNGs, just like original SVGs, but loading them is much faster


launches an application using the given name. The name should match the application desktop file name, as residing in /usr/share/applications, with or without the '.desktop' suffix


collects information about loadable input method modules for GTK+ 3 and writes it to the default cache file location, or to standard output


provides a complete listing of all settings related to GTK+ 3


is an icon theme caching utility that creates mmap()able cache files for icon themes

contains functions that implement the accessibility interfaces defined by the GNOME Accessibility Toolkit

contains functions that act as a wrapper around the low-level drawing and windowing functions provided by the underlying graphics system

contains functions that provide an API to implement graphical user interfaces