Description: This works for those who have both KDE and GNOME installed. I'm not sure if KDE installs GTK2 by default so you're on you own there and welcome to try.
You may have noticed that using apps like Firefox,Thunderbird, Gaim, Gimp, etc in KDE often gives very boring, flat and colorless backgrounds/widgets when used in KDE. This is because those apps are "Gnome centric" apps that use GTK2 (or in the case of Firefox/Thunderbird interact with it) to render those apps according to your theme settings in Gnome. When running them in KDE, it ignores all GTK 2 themes giving you that dull look. The fix for this is absurdly simply. If you happen to be one the many people who have both KDE and GNOME installed, you can fix it so that these apps display exactly as they would in GNOME, widgets and everything, while using KDE!
In your home directory, create a file named .gtkrc-2.0.
In that text file you want to add the following (here's an example with the theme I use)
gtk-font-name = "Comic Sans MS Bold 10" include "/home/visceral/.themes/Glossy P/gtk-2.0/gtkrc"
The theme I use happens to be Glossy P, you just substitute what theme you want to use.
Save the file and re-log in KDE. You'll find that all your GTK2 apps now use whatever theme you specified in the .gtkrc-2.0 file. You can remove the Bold statement if you don't want that, and of course you can substitute what font you want in place of comic. It makes a huge difference for apps like Firefox, GIMP and Thunderbird. The best of both worlds.
I found this fix in a gentoo thread. I take no credit for discovering it, etc.
**There is nothing to download, just create the file and that's it. It's simply an improvement already available to make GTK2 apps look better in KDE.
I just felt like I should point out a small mis-statement.
GTK Applications are as much gnome-centric as QT apps are KDEcentric (granted, many more QT apps depend on KDE than GTK on Gnome(because a certain something takes up 500M of install size)... blah blah).
That aside, the reason that your fonts and such are so fucked up - is because Gnome IMPROPERLY sets up GTK themes.
I never quite understood the process, but Gnome doesn't honor the gtkrc-2.0 file as it should - yet still somehow manages to make GTK look decent while Gnome is running. When Gnome quits, GTK is set back to it's default - which looks like a hairy man ass. QT looks like a hairy man ass dripping with candied carmel, but that's a different story.
Anyway... long -> short. GTK apps are not Gnome-centric. Quite simply, I despise GTK apps that depend on Gnome libs.
As to the poster who mentioned switch2. As of switch2 version (I believe software programmers who don't honor $APP --version should be shot); switch2 does not properly insert the font code.
Here is another thing which might help:
http://www.freedesktop.org/Software/gtk-qt
That makes Gtk2 apps draw using the same theme as Qt. You still need to play with the settings to get the fonts to look the same, but once it's done everything looks right. If only they could do this for Gtk1, we could have a fully consistent, skinnable desktop... at least for everything made with Gtk or Qt. :-)
or just edit or create the following file in: /etc/gtk-2.0/gtkrc (the file being gtkrc)
and make sure you see/add this line:
gtk-theme-name="/usr/share/themes/Industrial/gtk-2.0/gtkrc"
By doing it this way, you will see the same GTK2 Theme no matter if you are in root or as a normal user...
NOTE: the above theme and it's location is just an example, but should be correct for most distro's'.
Excellent, thanks for that correction. My main purpose was to just let people know this was even possible as I know a lot of people complain about it and don't realize it can even be done.
you can also just set the "gnome-settings-daemon" to startup when kde does and then use the Gnome Theme Manager to change themes. That will also enable Gnome's Sound Events as well... Which is always nice if you like to hear "clicks & dings" while using Gnome based applications in KDE...
Ratings & Comments
8 Comments
I just felt like I should point out a small mis-statement. GTK Applications are as much gnome-centric as QT apps are KDEcentric (granted, many more QT apps depend on KDE than GTK on Gnome(because a certain something takes up 500M of install size)... blah blah). That aside, the reason that your fonts and such are so fucked up - is because Gnome IMPROPERLY sets up GTK themes. I never quite understood the process, but Gnome doesn't honor the gtkrc-2.0 file as it should - yet still somehow manages to make GTK look decent while Gnome is running. When Gnome quits, GTK is set back to it's default - which looks like a hairy man ass. QT looks like a hairy man ass dripping with candied carmel, but that's a different story. Anyway... long -> short. GTK apps are not Gnome-centric. Quite simply, I despise GTK apps that depend on Gnome libs. As to the poster who mentioned switch2. As of switch2 version (I believe software programmers who don't honor $APP --version should be shot); switch2 does not properly insert the font code.
Here is another thing which might help: http://www.freedesktop.org/Software/gtk-qt That makes Gtk2 apps draw using the same theme as Qt. You still need to play with the settings to get the fonts to look the same, but once it's done everything looks right. If only they could do this for Gtk1, we could have a fully consistent, skinnable desktop... at least for everything made with Gtk or Qt. :-)
Same directions for GTK1.x apps, instead of ~.gtkrc-2.0 its ~.gtkrc. For those of you who still use some old GTK1 apps like sylpheed.
there is no need to logout to make this change working. Just restart the GTK2 App.
or just edit or create the following file in: /etc/gtk-2.0/gtkrc (the file being gtkrc) and make sure you see/add this line: gtk-theme-name="/usr/share/themes/Industrial/gtk-2.0/gtkrc" By doing it this way, you will see the same GTK2 Theme no matter if you are in root or as a normal user... NOTE: the above theme and it's location is just an example, but should be correct for most distro's'.
Excellent, thanks for that correction. My main purpose was to just let people know this was even possible as I know a lot of people complain about it and don't realize it can even be done.
you can also just set the "gnome-settings-daemon" to startup when kde does and then use the Gnome Theme Manager to change themes. That will also enable Gnome's Sound Events as well... Which is always nice if you like to hear "clicks & dings" while using Gnome based applications in KDE...
or just use switch2 (much more convenient =)