Yes, even CentOS 5.11 has this problem:
bash-3.2$ unset DISPLAY
bash-3.2$ wish
Application initialization failed: no display name and no $DISPLAY environment variable
% bash-3.2$ tclsh
% puts [package require Tk]; exit
no display name and no $DISPLAY environment variable
% exit
bash-3.2$ cat >/tmp/test.tcl
puts [package require Tk]; exit
bash-3.2$ tclsh /tmp/test.tcl
no display name and no $DISPLAY environment variable
while executing
"load /usr/lib/tk8.4/../
libtk8.4.so Tk"
("package ifneeded" script)
invoked from within
"package require Tk"
invoked from within
"puts [package require Tk]"
(file "/tmp/test.tcl" line 1)
bash-3.2$ wish /tmp/test.tcl
Application initialization failed: no display name and no $DISPLAY environment variable
(hangs at this point).
Note: The default tcl/tk on CentOS 5 is 8.4:
bash-3.2$ rpm -qa tcl tk
tk-8.4.13-5.el5_1.1
tcl-8.4.13-6.el5
It only hangs if there is a package require for Tk when *wish* is invoked.
Invoking *wish* implies [package require Tk]. Doing a package require in
plain tclsh, raises a error, complete with traceback.
>
> Arjen
>
--
Robert Heller --
978-544-6933
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
hel...@deepsoft.com -- Webhosting Services