I’ve been working on this script for a while, and now with the second version I think I’m pretty close to perfection. :P 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 (Qt 3, Qt 4, KDE 3, KDE 4) 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 KDE 4 controls as they were GTK+. That’s great. There is still the problem that you need to adjust Qt 3 and KDE 3 look.
UniformUI version 2 does the trick. :D 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 KDE 3 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 KDE 3 configuration file is created.
Finally, it assures that Qt 4 and KDE 4 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:
Download it here.
Warning: 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.