1819814 Members
2735 Online
109607 Solutions
New Discussion юеВ

Re: Xserver / Xclient

 
jpcast_real
Regular Advisor

Xserver / Xclient

Hello ,

I am trying to connect to an HP-UX from my Linux system . I want to export the graphical output from the HP-UX server to the Linux system but when I try I always get the same problem.

In the linux I make:

[root@dumas root]# xhost +
access control disabled, clients can connect from any host
xhost: must be on local machine to enable or disable access control.


Dartanan:/root> echo $DISPLAY
15.15.15.1:0.
Dartanan:/root> xomni
Starting GUI...
Please wait, this may take some time...
Xlib: connection to "15.15.15.1:0.0" refused by server
Xlib: No protocol specified

Wind/U X-toolkit Error: wuDisplay: Can't open display

I have also tried to use the xauth but I get the same result. Which method does linux uses , xhost or xauth , or both at the same time?

Why xauth does not work ? Do you have any howto.....

regards


Here rests one who was not what he wanted and didn't want what he was
24 REPLIES 24
Alexander Chuzhoy
Honored Contributor

Re: Xserver / Xclient

if you connect via ssh then you automatically have the enviroment exported to source's X.

Linux can use both xauth and xhost
for xauth read the man: man xauth

Alexander Chuzhoy
Honored Contributor

Re: Xserver / Xclient

onlinux machine
xhost +
on your unix machine do the following
export DISPLAY=x.x.x.x:0.0

then try to run the x program..
jpcast_real
Regular Advisor

Re: Xserver / Xclient

Hello Alexander ,

thank you for the answer . I have already done what you say several times but I havn't got any result. I think there must be something else in the Linux which is blocking the connection. The HP-UX works correctly with other systems...

How can I connect to a HP-UX from a Linux via ssh???
Here rests one who was not what he wanted and didn't want what he was
Alexander Chuzhoy
Honored Contributor

Re: Xserver / Xclient

I don't have HP-UX ,I've tried it with SUN.
Ask HP-UX related question on HP-UX forum.



Maybe you have a firewall implemented on Linux .
try to execute on linux -prior trying to connect with X

service iptables stop


This will stop the firewall service if it was running.


Please assign points if useful...
Jeroen Peereboom
Honored Contributor

Re: Xserver / Xclient

Javier,

to make sure I understand you correctly, or maybe you can follow the steps I mention.

* You login as root in a graphical environment (KDE, Gnome) on your Linux system (dumas).
* Next you execute 'xhost +' command
* You open a terminal and remote login (using telnet?) to the HP-UX system (dartanan).
* You export DISPLAY=15.15.15.1.0:0
* You execute xclock (or whatever graphical program)
* Next you receive an error message.

I that so?

JP.
Jeroen Peereboom
Honored Contributor

Re: Xserver / Xclient

HP has an SSH product (free).
It's on the HP-UX application CD's and most probably also on software.hp.com.

If you go along the ssh route,
modify the sshd_config file:
X11Forwarding yes


I'm worried about the output you showed us of your xhost + command. If I execute the command, I only get the line 'access control disabled, client can connect from any host'

I do not receive the line:
xhost: must be on local machine to enable or disable access control

I believe this is an error message. Are you sure you execute xhost on the local machine, the one with the X-server (your graphical display) running?

JP.
Martin P.J. Zinser
Honored Contributor

Re: Xserver / Xclient

Hello Javier,

this looks like a classical case of the Xserver vs. Xclient confusion.

The Xserver is the system you are sitting in front of. In my case this is currently a notebook running Linux. I also have a medium sized Alpha system under my desk. If I sent a window from there to my Linux system, the Alpha computer is acting as the Xclient.

So to allow access to the display you are sitting in front of: In a local terminal session type xhost +

On the remote system (the one providing your app) do a export DIPLAY=xxxxxxxx
Afterwards you should be fine.

Greetings, Martin
jpcast_real
Regular Advisor

Re: Xserver / Xclient

I have this concept clear... I export the display from the client and I make xhost + in the server to permit it to receive de X application . I have tried to do this with xhost and xauth but with both I get the same output
Here rests one who was not what he wanted and didn't want what he was
Jeroen Peereboom
Honored Contributor

Re: Xserver / Xclient

Javier,

the message xhost: must be on local machine to enable or disable access control.
indicates you execute xhost on the wrong system. Apparently it's not the system running the X-server.
But if you're sure you are right, I don't know how to solve your problem...

Success.

JP.
jpcast_real
Regular Advisor

Re: Xserver / Xclient

Yes I execute the xhost+ in the server machine , I mean the system which is trying to see the Display from the remote system , the client...

Does anyone knows if there is something in the linux which to block this.. Any security configuration perhaps ????
Here rests one who was not what he wanted and didn't want what he was
Jeroen Peereboom
Honored Contributor

Re: Xserver / Xclient

Javier,

I'm still not sure we understand each other.
(So don't be angry with me!)

1. Is dumas your Linux 'PC'? How do you login? Using CDE?
2. And dartanan your HP-UX system, where you run xomni?

JP.
jpcast_real
Regular Advisor

Re: Xserver / Xclient

Yes you are right:

Linux , Dumas , - Xserver
Dartanan , HP-UX -Xclient
Here rests one who was not what he wanted and didn't want what he was
Rick Beldin
HPE Pro

Re: Xserver / Xclient

The error that you are getting indicates that the request from your HP-UX machine is indeed making it to the Xserver, and he is rejecting it.

xomni might be a bad client to start with, since it is rather fussy about having the right fonts, and colors. A very simple application would be the utility program xdpyinfo, which merely reports back some characteristics of the Xserver. Does this work, or does it generate the same error messages?

In addition, verify that your Linux box is not preventing access to port 6000 on which the Xserver is listening. There is also the possibility with Xfree86 of configuring the Xserver that it does not even listen to network requests, but rather only to socket requests. This is done with the option -nolisten tcp.

Depending on which display manager you have, gdm, xdm, or kdm, you could have this configured in a couple of different places. For gdm, check /etc/X11/gdm/gdm.conf, for xdm/kdm check /etc/X11/xdm/Xservers and look for the lines where the Xserver is started. If you have -nolisten tcp, the Xserver will not listen to incoming tcp connections.
Necessary questions: Why? What? How? When?

Re: Xserver / Xclient

Take a look at the message you get from xhost..

access control disabled, clients can connect from any host
xhost: must be on local machine to enable or disable access control.

What ever you think you are doing correctly, the second line of this message "must be on local" indicates that you are on the wrong system OR you are not the original console owner.. ie: you logged in a 'user' su'd to root and tried to give the xhost command...
Xhost _must_ be given on the local host... not the remote host that your are running the app on and trying to display back to the local host..

Test this out by logging in at the console and opening up a terminal and immediately giving the xhost command... It should not have the second line of the messages from xhost..
Mark Grant
Honored Contributor

Re: Xserver / Xclient

I think you are using the wrong ip address for your DISPLAY.

In your original question, you have posted "echo $DISPLAY" and you appear to be on the HP-UX box when you do this. And it is giving you 15.15.15.1:0

could you post the output of "ifconfig -a" from your linux box.

THe only other two ways that seems to make sense of this to me are that a) you made a typo in your original post or b) You are getting a CDE login on you linux box already from HPUX, logging into that and then doing your xhost +.

To remove any doubt, get your linux box so that it doesn't start X. Create a file in your home directory called ".xinitrc" and in that file enter "xhost +" and the command to start your favourite window manager. Then start X from the command line with "xinit", don't use "startx" or any of the X wrappers. Then, open an xterm and type "echo $DISPLAY". Then, telnet to your hpux box and do your "export DISPLAY=" etc etc.

Please let us know how you get on:)
Never preceed any demonstration with anything more predictive than "watch this"
Martin P.J. Zinser
Honored Contributor

Re: Xserver / Xclient

Hello,

just tried that here.

Loging in to my local system, then opening a
terminal on another system, exported DISPLAY back to my current local system and doing the xhost + on the remote terminal. In this case I do get the error message you quote. So it still looks like you are confusing your various systems to me...

Greetings, Martin
jpcast_real
Regular Advisor

Re: Xserver / Xclient

I think this is the problem , the linux system do not have the 6000 port open in the network card whose IP is 15.15.15.1 . I must guess now how to make the Xserver listen in this port ...



[root@dumas root]# netstat -an | grep -i 6000
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 139.16.240.111:32780 139.16.240.109:6000 ESTABLISHED
tcp 0 0 139.16.240.111:32785 139.16.240.109:6000 ESTABLISHED
[root@dumas root]#
Here rests one who was not what he wanted and didn't want what he was
Rick Beldin
HPE Pro

Re: Xserver / Xclient

Try a real rudimentary approach by getting rid of the configuration that your display manager (gdm, kdm) puts on the system:

- runlevel 3
- startx
- in terminal window locally, xhost +
- telnet hp-ux
- export DISPLAY=linux:0
- xdpyinfo

If this works, then it really is your display manager config. If it doesn't, it hints at a firewall issue.

Again netstat -an | grep 6000 should show someone listening on port 6000 on the Linux machine. If you don't, the Xserver has some default config that is probably incorporating -nolisten tcp as a default value somehow.
Necessary questions: Why? What? How? When?
Michael Denney
Valued Contributor

Re: Xserver / Xclient

xhost: must be on local machine to enable or disable access control.

I have seen that message when I tried to run "xhost" as a user other then the owner of the xserver. Example:

On your linux box you log in at the GDM greeting screen as root. This brings you to a gnome/kde desktop. The xserver for this desktop session is owned by root. If you open a terminal on this gnome/kde desktop as someone other then root and try to use xhost, you will get this--

xhost: must be on local machine to enable or disable access control.

That message is the crux of fixing the problem. Possibly GDM/XDM is not allowing users to set access control.

As someone mentioned earlier, I would start troubleshooting by removing variables...in this case GDM or XDM. So, go to run level 3 by running as root:

init 3

Then start an xserver with windows manager by running:

startx

Now try doing "xhost +" and see if the xclient on your hpux box can display.

Regards,
Michael Denney
jpcast_real
Regular Advisor

Re: Xserver / Xclient

Hello ,

first of all I would like to know the procedure to assign point to all those who has helped me with this issue . The web is not very clear .. Apart from that I just have a doubt , I must make my servers open the 6000 port for the Xserver application but I can not find how to open them...

Can anyone help me , I have the same doubt in HP-UX and in Linux ....

Thakns
Here rests one who was not what he wanted and didn't want what he was
Jeroen Peereboom
Honored Contributor

Re: Xserver / Xclient

L.S.

for Linux:
check whether iptables / ipchains are running. I'm not sure, but must be something like ps -ef | grep iptables or ipchaing.
Or check the current run level and the start scripts in /etc/rcN.d.

Stop them with:
service iptables stop
service ipchains stop

This will stop the Linux firewall entirely.
Of course, after testing you may want to start them again.

JP.
Paul Cross_1
Respected Contributor

Re: Xserver / Xclient

NB: You havent specified which distro you are using. This (believe it or not) is important. As of fedora core 1, X11 TCP has been disabled... Don't ask me why. It's the most annoying "feature" of fedora.

If this is the case, change the following line in /etc/X11/gdm/gdm.conf:

#DisallowTCP=true

to:

DisallowTCP=false

-p
Ty Roberts
Frequent Advisor

Re: Xserver / Xclient

Hey, I know this post is old but maybe someone can offer my some help. I am having the same problem and I see the last "post" talks about Fedora Core 1, which I am running. I have made the change in the gdm.conf and restarted the daemons, but I still can't display any remote XWindows Apps on my desktop.. any advice?
John Collier
Esteemed Contributor

Re: Xserver / Xclient

Ty,

My first piece of advice would be to start your own thread. You could copy the url from this one to the body of your opening question to show people that you have found this and that you have a reference point if you wish.

No offense intended, but it is considered somewhat rude to try to tack your issue onto someone else's thread. They should not be burdened with having to assign points to responses to your situation.

Speaking of points, Javier, please assign this entry a zero (0) since it doesn't address your issue.

Thanks!
"I expect to pass through this world but once. Any good, therefore, that I can do, or any kindness that I can show to any human being, let me do it now. Let me not defer or neglect it, for I shall not pass this way again." Stephen Krebbet, 1793-1855