Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.


  Why does Tk look funny in CDE/VUE?
 
 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
wrapper solution.

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
automatically)

	uncde tkcon -slave "lappend auto_path /my/dir"

#!/bin/sh
#
# uncde
#
# 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"
    exit
fi

## Cache the old resources
OLD_RESOURCES=`xrdb -query`

## Remove what we didn`t want
echo "removing *foreground, *background and *Font resources"
xrdb -remove <