I’ve been working on this script for a while, and now with the second version I think I’m pretty close to perfection. I’ve always wanted to find a software which could let me have a nice integration between different kind of applications on Ubuntu. My favorite distribution is based on Gnome, which uses Gtk+ libraries to render GUI components.

It was already possible for Kde users to render Gtk+ controls as native Qt ones. But not vice-versa. You could obviously already find and configure similar styles for Qt and Kde imitating your Clearlooks, Human, or whatever theme. This is a very boring process. You have to install various configuration tools (two for qt and two for kde) and then set every single color by hand, and also the fonts of course.

My first version of this script (italian article here) was able to configure automatically every settings file (qt3, qt4, kde3, kde4) perfectly under Ubuntu 8.10. Now thanks to QGtkStyle too, it’s possible to get an even more integrated environment. You can get a native rendering of qt4 and kde4 controls as they were Gtk+. That’s great. There is still the problem that you need to adjust qt3 and kde3 look.

UniformUI version 2 does the trick. First of all it scans your Gnome settings searching for the colors you’re using, the fonts, and the cursor theme. Then it starts building configuration files. The first is the qt3 one. If you don’t have QtCurve for kde3 installed on your system, the script will download it for you and manually unpack it from an Ubuntu package (it should work on every distribution by the way). After that, the kde3 configuration file is created.

Finally, it assures that qt4 and kde4 apps use the native Gtk+ style. The only action you have to perform is starting the script in a terminal and typing your password when prompted. This is the default system mode. If you want to run in user mode, then you just have to start the script with the -u switch. In this mode every part of the configuration (even those useful and suitable for everyone) is written in you user directory. The only action performed as root is the installation of QtCurve.

Here’s a brief overview of two apps (one using Gtk+ and one using Qt 3) after setting a theme in Gnome and executing UniformUI:

uniformUI-1

Pretty good, uh?

uniformUI-2

Here’s another one, with different fonts

Download it here.

Attention: at this moment the script runs only and exclusively on Ubuntu 9.04 Jaunty Jackalope. Do not try to run it on other versions of Ubuntu.

The script should work with almost every Gnome theme, cursor theme, and font selection. I’ve tested it on Ubuntu 9.04 but it should work in every distribution (just be sure you’ve installed QGtkStyle). If you are encountering problems related to finding the colors, check if your theme supports them, and then try to change a little one of the colors and then bring it back to what it was (manually, don’t use the restore to defaults function). Finally run the script again, it should be fine.

Remember you need to run this script every time you change theme in Gnome. But it’s not such a difficult task…

If you have any suggestions, questions, messages, or anything else… just leave a comment here. I would be delighted if you could tell me whether it is good and suitable to your tastes or not after you’ve given it a try. Thanks.

Update: thanks to Nickholas for correcting my English grammar.