Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

setenv display do not work between linux and hpux

Status
Not open for further replies.

herzel

IS-IT--Management
Mar 5, 2003
73
IL
Hi to all the gurus

Have strange behavior when trying to open xterm.
The problem is as follow:
My workstation is Linux rhel 4 ws update 2
I am trying to open xterm on hp-ux machine b11.11 I open terminal on the Linux machine and type xhost + and then telnet to hp-ux machine and in the prompt (my shell is csh) I type "setenv DISPLAY the_ip_of_linux_machine:0.0" then I try to open xterm but no success. i know the xwindows is running on the linux machine. But when I do "netstat -a |grep LISTEN" I don’t have any thing on the linux machine on port 6000 .I do know that the xwindows in the linux machine is up because I see all the gui staff but I don’t know how can I make port 6000 listen

Please help
 
Try doing this instead of "setenv":

DISPLAY=the_ip_of_linux_machine:0.0
export DISPLAY
xterm &

As long as you have the xserver running on linux and have either allowed that specific host (xhost +host_name) or completely opened it (xhost +), you should get the remote xterm on your linux screen.
 
sbrews
Thanks for the reply
Well done the above suggestion with conjunction with ksh with no success
Any other ideas
 
is it giving any error messages? If so, what is it/are they?
Also, you do have X (or some X server) running where your display is exported to, right?
 
sbrews
Thanks for the reply.
The error message after some seconds is that the display cannot be opened. I had investigated this issue and I think that my problem is in reverse dns lookup.
Today I tried to ssh from my pc to pcx20383 (the host with the problem). I have got login prompt and logged to the host with root (the same root password for all hosts), when I logged in and typed hostname I found out that I am at different host (pcx0169)
Had this same problem yesterday went to the dns administrator and found that the pcx0169 and pcx20383 point to the same ip in the dns db (the ip of pcx1069) we changed this entry but today the same problem. I thought to try not to use hostname for the export display but ip address but the problem persist.
So :
1.i do not know what to do with the dns problem.
2.i do not know if the problem of the export display is the same as the problem of the dns and if yes why when i used export display with ip i got the same result. is the hp machine look in nsswitch of his own and search back to resolve pcx20383 in dns format even when i export the Linux machine with ip ???
Though problem!!!
Please help
 
Not sure what you will need to do to fix your DNS issue, but the X part should be easy.

Based on the error you are getting - the IP you are exporting your display to either doesnt have an X server running or xhost + (or equivalent) has not been run on that particular system.

1 - On your PC - start an X server (eXceed, Reflections X, Cygwin (actually a whole nix environment for windows), or some other X server of your choice).

2 - on your PC, open a dos window and type: ipconfig
make note of the IP address.

3 - on the system you want to export the display from:
DISPLAY=<ip of your pc>
export DISPLAY
xterm &

4 - Assuming everything is working (things from #1), you should get an xterm on your pc.


As long as you are exporting with IP addresses instead of names, it shouldnt matter that your DNS tables are not up to par.
 
sbrews hi
Thanks for the reply
My pc running Linux rhel 4 ws I did the above steps, I do not know if the Xserver running on the pc (Linux machine). But I am working from gnome environment I have all the gui staff. How can I ensure X running on my pc (Linux os(.
 
If you are using SSH, then you should use "ssh -X" which will automatically set the DISPLAY envvar upon login on the destination host. But also, you may need to edit the /etc/ssh/sshd_config file to allow X11Forwarding and restart the sshd. That help?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top