Syaptic and GTK-Qt

I ran across this thread on Ubuntu forums the other day regarding the GTK-Qt theme engine and kdesu. As you may know, the GTK-Qt theme engine is a handy KDE/Qt theme that basically causes GTK+ to call Qt functions to create widgets instead of drawing them itself. The result is that your GTK+ applications look exactly like native Qt applications.

The only problem I've had while using this in Kubuntu is that it doesn't work correctly when you start an application using kdesu, KDE's graphical version of su or sudo. For instance, if I start Synaptic from the Kmenu, my KDE theme doesn't take effect. In fact, in some cases, Synaptic seems to revert to some phenomenally ugly theme that I don't think I've ever seen before. However, if I start it using sudo from a terminal, it behaves as it should.

It turns out you can fix this with a couple of simple symlinks
sudo ln -s ~/.qt/qt_plugins_3.3rc /root/.qt/qt_plugins_3.3rc
sudo ln -s ~/.qt/qtrc /root/.qt/qtrc

That's it. Now Synaptic works as it should and all is right with the world. My only remaining question is whether this problem is a bug or a feature.

You can reply to this entry by leaving a comment below. You can send TrackBack pings to this URL. This entry accepts Pingbacks from other blogs. You can follow comments on this entry by subscribing to the RSS feed.

Add your comments #

A comment body is required. No HTML code allowed. URLs starting with http:// or ftp:// will be automatically converted to hyperlinks.