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 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
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 "127.0.0.1:4.0"

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
Hi,

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

hth.

B

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 )  

David

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.

Code:
YourPC                                         Remote
----------                                      -------------
ip: 192.168.1.1                      ip: 192.168.1.2
(or whatever)
localhost: 127.0.0.1

Display <- X Server      <---    xclient -display 192.168.1.1:0
                   /\
                    |
xclient -display 127.0.0.1:0


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 127.0.0.1 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.

hth

B



This page is a thread posted to the opentalk forum at www.opentalk.org.uk 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., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho