1833875 Members
1752 Online
110063 Solutions
New Discussion

Xhost Problem

 
SOLVED
Go to solution
A Sassi
Advisor

Xhost Problem

I have a w2k server with 2 nic cards external and Internal. The external nic card is connected to a router and the internal nic (192.6.2.2) card is connected to a switch. All internal NT network works fine I also could browse the Internet. I added a Unix server and assigned an external IP address to lan1. From the NT internal network I could connect to Unix system with no problems using reflectionx. The problem I am facing, I can not export the display to the NT box.
#export DISPLAY=192.6.2.134:0.0
# xhost +
I get this error
xhost: unable to open display "192.6.2.134:0.0"

If I am at the Unix box I could ping anything outside, I also could ping the w2k external nic card, but can not ping the internal nic card 192.6.2.2. I don???t know what the problem is? If anyone could help.. My advance thanks.
8 REPLIES 8
Robert-Jan Goossens
Honored Contributor

Re: Xhost Problem

Hi,

Check your client-ipadres,

# who -um
# export DISPLAY=ipadres:0.0

or

# export DISPLAY=`who -um | awk '{print $NF}':0.0`

Hope it helps.

Robert-Jan.
Vincent Fleming
Honored Contributor

Re: Xhost Problem

The xhost command has to be executed on the display station.

So, you do the "export DISPLAY=XXXX" on the UNIX server, and "xhost +" on the Windows box. You should then be able to launch an XTERM (or similar) on the UNIX box, and have it display on the Windows box.

The ping problem in your last paragraph sounds like a different problem. Check your routing tables on that one. Post back if you don't find the problem.

Good luck,

Vince
No matter where you go, there you are.
Sridhar Bhaskarla
Honored Contributor
Solution

Re: Xhost Problem

Hi,

Long back I worked on Reflection X.

xhost + is supposed to be run on the box that is running the X-server. In this case, you should run xhost+ on the w2k server not on the telnet session of your UNIX server.

I guess, xhost+ is enabled by default on Reflection if I remember correctly. If your Reflection X server is running, then it is enough for you to just export DISPLAY on the unix server and then run the X-window application from it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: Xhost Problem

xhost+ is a security issue on hp-ux, it should only be used for diagnostic purposes.

do an ifconfig lan0 or lan1 to get the ip addy for the above instructions.

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A Sassi
Advisor

Re: Xhost Problem

Thanks for all your reply. I might not explain my problem better. Reflection software has 3 options FTP session, VT session and reflection x session. When I open the reflection x session I select Generic HPUX hpterm, I try to connect to the Unix server but nothing happens, I don???t get anything. When I use the VT option, which is a Telnet session, I login as root then I type
# export DISPLAY=192.6.2.134:0.0 (the IP address is for the NT internal client. As I mentioned before the server has 2 nic cards the internal card for the server is 192.6.2.2 Where the External card has an external IP address as well as the UNIX server.)
I can ping the UNIX server from NT client (192.6.2.134) but I cannot ping the NT server internal nic or any internal clients from the Unix server.

Also when I type either of the following commands on the reflection telnet session opened on the NT client I get
# xhost +
Error: Can't open display: 192.6.2.134:0.0
Error: Couldn't find per display information
# xclock
Error: Can't open display: 192.6.2.134:0.0
Error: Couldn't find per display information
I think the x command does not come back to the NT client because the Unix has an external IP and the NT has an Internal IP.I am thinking the problem could be with routing traffic from external to Internal but I am not sure. I really appreciate all your help guys. Thanks
Alex Glennie
Honored Contributor

Re: Xhost Problem

I suspect this is down to routing as much as anything ...looks like you may need to run route add .. see man route ?

I beleive the reason you are getting xhost: unable to open display errors in the hpterms is probably because the hpterm is not being run under a CDE session or equivalent window manager and as such has no X session to have a display exported to ... NB a terminal session on its own does not support X.

A Sassi
Advisor

Re: Xhost Problem

I just found out the Problem is with 2 nic cards. I have lan0 and lan1. When I ping the hostname I get a replay from lan0 even though it's disabled. Lan1 has the external IP address. I can ping the external IP address of the W2k server with no problems. but when I ping the hostname I get the lan0 reply. Any Idea How to fix this.
Alex Glennie
Honored Contributor

Re: Xhost Problem

What's your O/S and patch level wrt CDE ? fyi there were known issues with systems & multiple lan cards circa Nov 2000 hpux 11.00: fix is included in later CDE Runtime patches : see PHSS_20716.text or later patches.