Tag Archives: GTK


With the introduction of the new theme for Ubuntu 10.04 there has been much controversy over the placement of the window management buttons. A lot of people (or perhaps a small but very loud group of people) have complained about how the positioning on the left is bad. The thing is another major OS places its window management buttons on the left; OS X. I’m positive that Apple put a lot of usability research into the placement of those buttons. There’s no way the developers just arbitrarily placed the buttons on the left. But that’s besides the point of this post. What I find kind of ironic amongst all of the complaining is the most downloaded theme on gnome-look.org is this theme. And guess where the buttons are placed. That’s right, on the left. If buttons on the left are so bad, why do so many people want them? Just sayin’.


Install Qgtkstyle

Since I haven’t found any proper debs of qgtkstyle around, I’m just going to tell how to compile it from source.

If you don’t know what Qgtkstyle is, Qgtkstyle is a Qt theme engine that uses your GTK theme directly.

First thing to do is to enable the Backports repository since you need Qt 4.4 which is in the Backports in Hardy.  You can do this by going System→Administration→Software Sources, then going to the Updates tab and enabling the “Unsupported updates (hardy-backports)” repository.

Software Sources
Software Sources

Click Close and then click the Reload button when prompted.  Now to install all the development packages needed to compile Qgtkstyle.

sudo apt-get install build-essential libqt4-dev libgtk2.0-dev subversion qt4-qtconfig

This is optional if you want to install with Checkinstall

sudo apt-get install checkinstall

Now to get the code

svn co svn://labs.trolltech.com/svn/styles/gtkstyle

There should be a folder in your home directory called gtkstyle. Now enter that directory

cd gtkstyle/

Now compile it

qmake qgtkstyle.pro

Now here you have a choice. You can either just install it directly with

sudo make install

Or you may like to build a deb out of it for easy removal later if need be.  In that case do

sudo checkinstall

and follow the instructions.  They’re pretty self explanitory.

Now if you go under System→Preferences→Qt 4 Settings you can choose GTK from the drop down menu.

Qt 4 Settings
Qt 4 Settings

Then do a File→Save and enjoy Qt applications with a nice GTK integration. 🙂

Also if you want to see a little Easter Egg move that preview window around. Yes you can actually move that. I won’t spoile the surprise. It gave me a little laugh when I first found it. 😉

Why the hate for Qt?

I’ve noticed there seems to be a lot of “ZOMG it’s Qt! Oh Noes!” going on and I just don’t get it.  I think the reason is some confusion and lack of understanding.  Now I’m not talking about the programming languages behind Qt and GTK, I’m talking about the typical end user’s experience.  People seem to assume that Qt == KDE, Qt requires a lot of KDE libs, and/or Qt looks ugly and doesn’t integrate well in a GTK environment.

First, a Qt application doesn’t always mean it’s KDE.  Yes KDE is based on Qt, but there’s a huge difference between a pure Qt app and a KDE app.  An application that is written in pure Qt has nothing to do with KDE whatsoever.    Some of these include SMplayer, KeePassX, VLC (0.9.2), VirtualBox, and many others.  KDE apps will depend on a lot of KDE specific stuff that will have a lot of dependencies.  This goes on to the second point.  A pure Qt app does not require a tone of KDE libs since it has nothing to do with KDE.  All it usually needs libqt.

Finally to put this integration mess to rest.  Qt integrating into a GTK environment used to be an issue.  This is no longer true.  This argument is deprecated.  Qgtkstyle (which will come bundled with Qt 4.5 😀 ) is a Qt theme engine that uses your GTK theme directly.  It does not try to emulate a GTK theme or anything like that.  It actually uses the GTK theme.  So now it can’t be argued that Qt doesn’t integrate with GTK anymore.  You pretty much can’t tell the difference.

SMplayer Preferences
SMplayer Preferences

You almost can’t even tell those are Qt applications.

So I just don’t understand all the Qt hating going on.


Changing GDM’s GTK Theme

This guide is outdated and will not work the current GDM.

I’m surprised I didn’t figure this out a while ago because the answer has been staring at me in the face this whole time. 😆

Have you ever gotten a very nice looking GDM theme only to be disappointed because the widgets and highlights were still themed in the Human theme and it clashed horribly?  Like this?

Ugh. 😯

Well there’s actually a very simple solution to this.  If you go under System→Administration→Login Window, the General tab contains a check box that says “GtkRC file:”.  This is where you can specify a gtkrc file for GDM to use so it will use a different GTK theme.

Most themes can be found in /usr/share/themes/ and the gtkrc file will be located in the gtk-2.0 directory under the theme name.  In the example I used the Clearlooks gtkrc and afterwards my GDM looked like this:

Ah, much better. Happy theming! 🙂