This is pretty tricky, old school X11 stuff.
Your Xrdb contains a specification that the background colour for the gitk main window be S_base3
, but nothing knows how to parse that colour name, neither Tk itself nor the Xserver, which means you get an error during toplevel widget creation when the gitk application is trying to create its main window (it's trying to parse the Xrmdb entry and doing the software equivalent of exclaiming “Wat!?”).
The Xrdb is a way of specifying defaults for various attributes of GUI applications. One of those attributes is the background colour. In your case, you've probably got an entry something like this:
Gitk.background: S_base3
Or maybe:
*.background: S_base3
The Xrdb is really maintained in a property of the X root window (RESOURCE_MANAGER
) and it is global across all applications. The default contents are typically initialised from a file in your home directory (conventionally ~/.Xresources
) but they could be set by your desktop environment too. Working out what's causing the problem can be tricky as so many programs can write to that property.
The xrdb
program can be used to edit the resource database. For example, you can use:
xrdb -query >xprops.txt
to list the current contents to xprops.txt
. Edit the file to get some sensible values in, and then use:
xrdb -load <xprops.txt
to install the new values.