Cywing and Tk/Wish
Posted by neo (The Architect), 1 February 2005I connected to a Unix machine with Cygwin and then tried to excute a Tk application but it is failing sayin that the Quote:
The probelm is because it cannot connect to my local PC. What can i do about this?
Posted by admin (Graham Ellis), 1 February 2005That'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 2005A 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 2005Exceed 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 2005I 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 2005Hi,
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.
Posted by dcorking (David Corking), 4 February 2005on 02/03/05 at 12:27:36, The Architect wrote:
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 2005What 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 2005as 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 2005Aha, ok, a little diagram then.
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.
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: firstname.lastname@example.org • WEB: http://www.wellho.net • SKYPE: wellho