08-17-2011 04:06 AM
I have checked out google and also the previous posts in this forum, however was not very clear enough.
I have installed Cygwin on my Windows Vsta PC. Attached is the screenshot of what I get when I open cygwin.
Now I login to my HPUX box through putty and give the following ::
#export DISPLAY=184.108.40.206:0.0 ----> This is the IP address of my Windows PC
I have enabled the first line to 1 in /etc/rc.config.d/xfs
xterm Xt error: Can't open display: %s
#xhost + 220.127.116.11----> This is the IP address of my Windows PC
xterm Xt error: Can't open display 18.104.22.168
I have disabled my windows firewall and other firewalls.
I try the other way...
from Cygwin I try the following
bash-4.1$ ssh <To my HP-UX Box>
bash: ssh: command not found
bash-4.1$ ping HPUX server
Pinging HPUX with 32 bytes of data:
Reply from HPUX : bytes=32 time=29ms TTL=251
Reply from HPUX : bytes=32 time=31ms TTL=251
Ping statistics for HPUX :
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 29ms, Maximum = 31ms, Average = 30ms
and also I can ping my PC from the HPUX server.
so where did i go wrong......
Solved! Go to Solution.
08-17-2011 05:26 AM
In the attached picture is a cygwin terminal window. This is kind of similar to Windows Command Prompt: it cannot display any graphics. To use xterms, you must run the X11 server component of Cygwin, also known as Cygwin-X.
Apparently you're using the traditional X11 connection procedure, which results in an unencrypted X11 connection: anyone on the same network can spy on your keyboard and mouse actions. But if you need to use it anyway, here's some diagnostics.
When you start Cygwin-X on Vista for the first time, it is likely that the Windows Firewall or the firewall component of your Windows security solution reports that Cygwin-X is trying to act as a network server on TCP port 6000. To make unencrypted X11 connections work, you must allow this.
When your Cygwin-X (or other X server) is running on your PC, you should be able to reach it from the HP-UX box using telnet to port <DISPLAY number + 6000>. For example:
telnet 22.214.171.124 6000
This connection will not produce any meaningful command prompt; but if the telnet command says "Connection established" (or the equivalent text for your locale/language), then the unencrypted X11 connection is possible.
However, instead of Cygwin-X I would suggest Xming, for it's easier to start up and works well with PuTTY's X11 forwarding function (assuming you use the SSH connection method, not telnet or rlogin).
You can find the latest free Xming and Xming-fonts packages from Sourceforge:
They are normal Windows self-extracting install packages; just install them using the default values. First Xming, then Xming-fonts.
Then start Xming; it will add its icon in the notification area in the bottom right corner of your screen. You won't have to do anything else with it.
Then start PuTTY. If you have a pre-configured session, select it and click Load. If you don't have one, just type the hostname or IP of the HP-UX box to the destination field in the PuTTY configuration dialog. But don't press Enter or click Login/Open just yet!
Before logging in, go to Connection -> SSH -> X11 in the PuTTY configuration dialog and check the checkbox "Enable X11 forwarding". You can leave the "X display location" field empty. (If you want, you can save the connection settings at this time, with a descriptive name, like "<your HP-UX> with X11") Then start the connection.
When you login with X11 forwarding for the first time, you may see a message telling that sshd has created the $HOME/.Xauthority file on the HP-UX box. If the file already exists, you won't see this message (and it's information only anyway).
If the sshd daemon on HP-UX was configured to allow X11 forwarding, your DISPLAY should already be set to a strange-looking value, for example something like 127.0.0.1:10.0. Don't change it: the value is set automatically by sshd and is required for the SSH X11 forwarding to work. Because sshd also has created the X authority keys for you, you don't need any "xhost +" commands either.
Now, if you run something like "xterm &" on your PuTTY window, you should get a xterm window on your Windows display. You can run any X11 applications in the same way. If you log out in the PuTTY window, PuTTY is smart enough to wait for the X11 applications to stop before actually closing the connection; but if you force-close PuTTY, all your running remote X11 application windows will be forced to close too.
If you saved the PuTTY connection settings, connecting again will be very simple:
- make sure Xming is running
- start PuTTY
- select the connection settings you saved and click Login (or Open, in some versions of PuTTY)
08-17-2011 05:54 AM
Hi Grayh ,
Try this out :
1) Check your Xserver is running.
Xservers accepts connections through TCP port 6000.
Then, open a CMD windows in your PC and type:
netstat -an | find ":6000"
It should print a line whose last word is "LISTENING".
If not, you need to start an Xserver.
(2) Open a telnet session and run in your HP-UX server:
$ export DISPLAY=UR_PC_IP:0
$ xterm &
$ netstat -an | grep 'UR_PC_IP.6000'
Last command should print a line. Last word in this line reports the status of Xterm connection. I guess it might show SYN_SENT (or any other different than ESTABLISHED). In this case, this is due to anything (for instance, a firewall) is preventing the Xterm connection
08-17-2011 09:12 AM
>xhost + 126.96.36.199
This command (or something like it on Windows) must be done where you are displaying and you need to use the IP of where you want to run the X client
08-17-2011 10:23 AM
Hi Matti Kurkela,
Thanks for your detailed explanation. Now I understand my mistake.. I have downloaded the cygwin s/w from www.cygwin.com---> Install Cygwin X from here icon.
I am sure the procedure you have mentioned will work for sure. Could you please direct me as from where I can download the X11 server component of Cygwin.
08-17-2011 11:06 AM
When you clicked the "install Cygwin/X from here", you received the setup.exe for the Cygwin package. If you didn't delete it, you can use it to update the entire Cygwin suite, and/or to choose the parts of Cygwin you want installed.
To get Cygwin/X, you must select the "xinit" package from the "X11" category. This will automatically select a group of other packages.
I think the Cygwin/X installation instructions describe the installation procedure very clearly, with pictures. If you have any questions after reading this, please post them.
But I think Cygwin/X is overkill if you don't need any other parts of Cygwin. In that case, the Xming I recommended earlier is much simpler to set up and use.