With the release of Gnome 3, many developers of GTK apps have begun to port their programs from GTK2 to GTK3. If you have used Ubuntu 11.04, you will notice that many of the popular GTK2 themes did not yet have GTK3 equivalents, which left the few GTK3 applications looking awful.
The latest versions of Fedora, Ubuntu, and other Linux distributions have better support for GTK3 for Gnome, XFCE and other GTK-based desktops, but if you are a KDE user, you might have noticed that the default Oxygen theme works for GTK2 apps but not for GTK3. The following brief guide will explain how to get your GTK3 apps looking good in KDE. Nothing you do here will affect your GTK2 applications or your KDE installation.
The solution to this problem is a package called oxygen-gtk3, which has made its way into some Linux distributions. If it is not in your distribution’s default repository (and it probably is not unless you have the most bleeding edge release), you can likely get the package from a third party.
For Kubuntu and other Ubuntu-based distributions, add the following repository:
Then, install the package called gtk3-engines-oxygen:
sudo apt-get update sudo apt-get install gtk3-engines-oxygen
For OpenSUSE, you need to add the swyear repository:
sudo zypper ar Index of /repositories/home:/swyear/openSUSE_12.1
Then, install the oxygen-gtk3 package:
sudo zypper install oxygen-gtk3
Other distribution installation procedures will vary. I did find Fedora packages available from this user, but did not find any distribution-specific installation instructions.
For Archlinux, you need to install oxygen-gtk3-git from AUR.
Completing the Installation
If you have come this far, you might have noticed that your GTK3 applications still look awful, even after you restarted your desktop environment. That is because GTK3 requires its own configuration file called settings.ini, which may remind you of your old Windows days. Fortunately, this settings.ini is not quite so aggravating, and you will only need to add a single configuration line.
If one does not already exist, create a folder at this location “~/.config/gtk-3.0“. In Archlinux, you can apparently just link to the default file:
ln -s /usr/share/themes/oxygen-gtk/gtk-3.0 ~/.config/gtk-3.0
Next, create a file inside the gtk-3.0 folder called settings.ini. Using the text editor of your choice, add this line:
gtk-theme-name = oxygen-gtk
Save and close your text editor, and the settings should take effect immediately. If not, restart your desktop environment. When you open applications like Gufw, you should now see your Oxygen theme rather than the ugly , un-themed GTK3 default that it previously displayed. There have been some reports of certain apps crashing on some distributions. I have not experienced this, but if you do, you should definitely report it to the appropriate developers.
Keeping it Seamless
KDE users tend to like everything to flow nicely together. Oxygen-gtk3 allows you to keep your desktop looking seamless even when you need to use a GTK program. With the next major releases of most Linux distributions, you will probably see this package added by default, requiring no further action on your part. Until then, the above instructions should remain valid and usable.