Introduction to GTK+ 3

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

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

Package Information

GTK+ 3 Dependencies


at-spi2-atk-2.18.1, gdk-pixbuf-2.32.1, and Pango-1.38.0


Optional (Required if building GNOME)



adwaita-icon-theme-3.18.0 (needed to run some tests), Colord-1.2.12, Cups-2.1.0, DocBook-utils-0.6.14, GTK-Doc-1.24, JSON-GLib-1.0.4, and rest-0.7.93

User Notes:

Installation of GTK+ 3

Install GTK+ 3 by running the following commands:

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

Some tests may 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, issue make check.

Now, as the root user:

make install


If you installed the package on to your system using a “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 Broadway HTML5 GDK backend.

--enable-wayland-backend: This switch enables the Wayland GDK backend which is required for GNOME Wayland support. Remove it if you have not installed the recommended dependencies.

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

--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 (eg gnome-themes-standard-3.16.2 or an icon theme (such as adwaita-icon-theme-3.18.0) you can set your prefences in ~/.config/gtk-3.0/settings.ini. Eg:

mkdir -p ~/.config/gtk-3.0 &&
cat > ~/.config/gtk-3.0/settings.ini << "EOF"
gtk-theme-name = Adwaita
gtk-icon-theme-name = Adwaita

There are many more themes available at and other places.

Once you've settled on themes you like, you can (as the root user) make them the default system wide:

cat > /etc/gtk-3.0/settings.ini << "EOF"
gtk-theme-name = Clearwaita
gtk-fallback-icon-theme = elementary


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, and gtk-update-icon-cache
Installed Libraries:,, and
Installed Directories: /etc/gtk-3.0, /usr/include/gail-3.0, /usr/include/gtk-3.0, /usr/lib/gtk-3.0, /usr/share/gtk-3.0, /usr/share/gtk-doc/html/{gail-libgail-util3,gdk3,gtk3}, 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.


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 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.


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


is a simple program that demonstrates some of the things 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.

contains functions that implements 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.

Last updated on 2015-10-14 21:38:08 -0500