Hideous GTK themes in KDE4 sessions.

For some time, GTK apps running inside my KDE4 session would not pick up their theme
properly, making them look hideous in their default theme. I’m using a small wrapper
script (/usr/local/bin/startkde4) to get my KDE4 desktop up and running. Since I’ve put
the “unset GTK2*” line into the script, GTK apps pick their theme again:

#!/bin/sh

export LD_LIBRARY_PATH=/home/kdedev/kde/lib
export KDEDIR=/home/kdedev/kde
export PATH=$KDEDIR/bin/:$PATH
export KDEHOME=~/.kde4

unset GTK2_RC_FILES

. /home/kdedev/kde/bin/startkde

If you’re still living under the “I use a GTK1 app” stone, put another line for GTK(1) apps
in there.

Hope this tip keeps someone from tearing out hair. :)

Posted in KDE