Gtk2 and Gnome2 Applications Outside Gnome2
Two issues show up a lot on the lists about getting Gtk2/Gnome2 applications to display correctly when not running Gnome2. As often happens with Gnome in general, and especially in SuSE, the answers are poorly documented, if at all.
Fonts: Create a config file in your home directory -- ~/.gtkrc-2.0. In this file, place one simple line:
gtk-font-name = "Arial 12"
You can choose any font that is processed by Xft (see Font Fight for details on that), using the capitalized name and point size that suits you.
Theme: To get the color scheme you like, choose one that is available on your system -- /usr/share/themes in SuSE 8.2 -- and make sure it is indeed Gtk2, as not everything there is. You can also download and install your own in ~/.themes. As root, make a soft link ("s-link") from that folder name (mine is "/Dirty-Ice") to /opt/gnome2/share/themes/ and name it "Default". If you have multi-users on your system, be aware that it will affect them, too.
The command line would look like this:
ln -s /usr/share/themes/[theme] /opt/gnome2/share/themes/Default
For a single user, go back to your ~.gtkrc-2.0 and add a line like this one:
include "~/.themes/Dirty-Ice/gtk-2.0/gtkrc"
Of course, you have to match the details to what you wish to use as your theme. It can reference any Gtk2 theme on your system.
By Ed Hurst, 06 July 2003
This document has been released into the public domain.