The problem is that this idiotically designed window managers set X
resources for *foreground, *background, *Font, etc..., which gets
imposed on Tk. The real problem is that CDE apps rely on these
resources being set (no sane defaults). The following is a quick
The solution is provided as a shell script which wraps around any Tk
program which you might normally run. It is assumed that you have
"xrdb" and the program in your regular path. If this is how you
normally launch your app:
tkcon -slave "lappend auto_path /my/dir" &
then you would now do: (notice that the wrapper backgrounds
uncde tkcon -slave "lappend auto_path /my/dir"
# This script will temporarily remove those lame global resource bindings
# that screw with Tk applications. It launches the Tk app (which is assumed
# to be in your path), gives it a few seconds to load up, and then restores
# the old resources.
# Example usage: uncde tkcon -slave "set a 50"
if test ! "$1"; then
echo "usage: $0 command options"
## Cache the old resources
## Remove what we didn`t want
echo "removing *foreground, *background and *Font resources"
xrdb -remove <