We have tcl scripts that we run remotely via ssh. These scripts run great between tiger to tiger macs and tiger to leopard macs but not between leopard 10.5.? macs. If you are running leopard and ssh into another mac running leopard with, ssh -X user@mac and then type xcalc, xclock, or xeyes, all display fine. However if I try to run my tcl script which again I repeat ran fine on previous mac operating systems, I get the following error:
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
couldn't allocate new Mac window
/usr/bin/wish: line 2: 87765 Abort trap "$(dirname $0)/../../System/Library/Frameworks/Tk.framework/Versions/8.4/Resources/Wish Shell.app/Contents/MacOS/Wish Shell" "$@"

I don't know why it is trying to connect to a window server as the mac is not configured to connect to a window server.

Any help would be greatly appreciated. Thanks.