Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
Cywing and Tk/Wish

Posted by neo (The Architect), 1 February 2005
I connected to a Unix machine with Cygwin and then tried to excute a Tk application but it is failing sayin that the Quote:
"Application initialization failed: this isn't a Tk applicationcouldn't connect to display ""

The probelm is because it cannot connect to my local PC. What can i do about this?

Posted by admin (Graham Ellis), 1 February 2005
That's an X Windows server that you're missing or isn't correctly configured.  Either run an X server such as eXceed on your PC, or set the DISPLAY variable to point to s system that is running such a server.

Posted by neo (The Architect), 2 February 2005
A few questions here
1) is Exceed freeware?
2) I know few guys here who say that CYGWIN is a great replacement for Exceed. So what exactly is the difference between them. Does Exceed overload the server more or is the display processing done on locally?

Posted by Custard (Custard), 2 February 2005
Exceed costs money.

Cygwin is free

Both provide an X Server.

To be honest I can't think that one is better than the other except on cost. Cygwin I think comes with some ports of unix utilities though. Haven't used exceed for a while now'

hth (a bit)

Posted by neo (The Architect), 3 February 2005
I am able to connect using Exceed and run WISH apps. But Cygwin cannot as I said above. Do I have to install the X server separately in Cygwin or does it come along with Cygwin installation?

Posted by Custard (Custard), 3 February 2005

I'm not too familiar with Cygwin, but a brief search reveals a Cygwin X
at which may well be the X server part of Cygwin.



Posted by dcorking (David Corking), 4 February 2005
on 02/03/05 at 12:27:36, The Architect wrote:
Do I have to install the X server separately in Cygwin or does it come along with Cygwin installation?

You should choose to install the X server from the Cygwin installer cygwin.exe.  

As I recall, last time I installed Cygwin (2 or 3 years ago) it gave me a menu icon of an 'X'.  I needed to run that, which started a new command shell.   Then I would run the X clients, such as your Tcl application, from that command shell window.  

However I must admit that I was using another layer (ssh) that bypasses the security that a good X server installation puts around itself.

If that outline isn't enough to get you started, let me know and I will boot up Windows and install Cygwin again - working out some detailed instructions (or I will look on the web for someone else's )  


p.s. I have a feeling that without ssh, you will need to knock down one or two security walls intended to protect your desktop from the network.

Posted by neo (The Architect), 4 February 2005
What i meant is that I am able to run Tk apps from my local machine but when I connect to the remote sys and them try any of the Tk apps there I get that error.
I tried exporting the display but that didnt work.
However Exceed is able to do that fine

Posted by dcorking (David Corking), 4 February 2005
as I thought - a security restriction in the Cygwin X server.

Without such restrictions, anyone in your LAN can listen in to anything you do on exceed or the cygwin x.

as I recall correctly the cygwin x server has mit-magic-cookie authentication - if you want to persist with cygwin, you need to export that cookie to your session on the remote host

or if you trust everyone on your lan, and are sure there are no intruders there, use the xhost command

Posted by Custard (Custard), 4 February 2005
Aha, ok, a little diagram then.

YourPC                                         Remote
----------                                      -------------
ip:                      ip:
(or whatever)

Display <- X Server      <---    xclient -display
xclient -display

I hope I am not being too basic, but here is a brief description of what's going on.
X Windows is networked from the ground up. The X server serves the display to xclients which are applications.  The x clients connect via the network to the x server.

xclients (applications) on the local machine can connect to localhost quite happily, but the xclient on the remote machine needs the ip address (or hostname) of the machine with the xserver where the display is.

The 0.0 bit after the ip/hostname is the display and screen number. usually the first display is 0 and the default screen is 0 so you don't need the second 0.
hence you can abbreviate to hostname:0

Maybe you really mean 4 in your original post, if so then that is fine, but will always be localhost on any machine.

If the xclient is a unix box, you can set the DISPLAY environment variable to point to the xserver, and you don't have to specify it with -display.  The login shell usually does this for you, but connecting from windows,  you may have to set it yourself or configure the rexec or whatever you are using in exceed or cygwin to do it for you.



This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho