From Gentoo Wiki
(Redirected from GTK+)
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.

GTK is a toolkit for creating graphical user interfaces. It is part of the GNU Project and maintained by GNOME.


GTK-2 and GTK-3

For gtk-2 and -3, users can install the libraries with the following command:

root #emerge --ask x11-libs/gtk+

Some applications may optionally be built with support for a GTK interface when enabling the gtk USE flag. Users may even choose to enable GTK support for all packages in /etc/portage/make.conf.


In Gentoo, Gtk-4 is provided by gui-libs/gtk, a separate package.

root #emerge --ask gui-libs/gtk


The following programs can be used to change the appearance of applications using the GTK toolkit:

System-wide dark theme


FILE /etc/gtk-3.0/settings.ini
gtk-application-prefer-dark-theme = true


Mouse scrolling doesn't work

With the gtk-3 applications under fvwm or other window manager / desktop environments, mouse scrolling sometime doesn't work as it should or at all. At the same time, it work with the applications using other toolkit environments like Qt, which imply this is not a system or Xorg configuration issue. To fix that issue, to add the following environmental variable should work, as example:

FILE ~/.bashrc

For more information, see GTK applications (sometimes?) do not scroll correctly, lacks focus?.