GTK

From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it - how to get started.
Resources

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

Installation

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.

GTK-4

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

root #emerge --ask gui-libs/gtk

Configuration

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

Troubleshooting

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
export GDK_CORE_DEVICE_EVENTS=1

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