How to Make GTK3 Apps Look Presentable in KDE4

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.

GTK3 app before adding Oxygen support

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:

For OpenSUSE, you need to add the swyear repository:

Then, install the oxygen-gtk3 package:

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.

GTK3 app after installing oxygen-gtk3

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:

Next, create a file inside the gtk-3.0 folder called settings.ini. Using the text editor of your choice, add this line:

Editing GTK3 settings.ini in Kate

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.

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.

8 comments

  1. When I only added the one line you stated above, I saw a warning about failing to parse the settings.ini because the “Key file does not start with a group”.

    When I added “[Settings]” as the first line, this warning went away. 

    Even so, I’m not sure that anything actually changed.  Also, I’m still getting a warning when invoking gufw:

    “Theme parsing error: gtk.css:57:46: Unknown value ‘GTK_SHADOW_NONE’ for enum type ‘GtkShadowType'”

    • You should see the oxygen theme now when you start gufw. I get the same warning when starting it, but it looks like my other KDE apps.

  2. Doesnt help much as there is still no way to get GTK3 apps look good under KDE unless you force everything to use Oxygen which looks UGLY in my opinion or use the GTK theme in KDE also not that good as finding a theme that all three can use and not look horrid is rather tough.

    • Yes, but while oxygen is a matter of taste, at least this tool makes it possible to set up any available themes for gtk2 and gtk3 under kde easily. Now if there are no matching themes available for all three environments besides oxygen, then it is merely a lack of themes and not the tool at fault.
      Same is still true for gnome/unity with regards to matching GTK2 and GTK3 themes: Not all of them have been ported and matched. I therefore think that with the tool for KDE available and in use, more people could be encouraged to make and match themes between KDE and gtk3 (gtk2 apps will eventually be replaced in the future, so likely there is no need for new gtk3 themes to be made backwards compatible, but that’s mainly a decision for gnome-theme designers then anyway where you can’t blame KDE if there is not even “unity” among gtk2 and gtk3…).

      • Thanks Starbuck, There seems to be a lot of pointless pessimism going around. @google-69abf90c0b969387f3003eaaedd77446:disqus If you want another theme to have GTK3 support, you should talk to the developer of the theme. Most of them are pretty friendly.

Comments are closed.

Sponsored Stories