Operating System - Linux
1821051 Members
2776 Online
109631 Solutions
New Discussion юеВ

Xlib: connection refused by server

 
ankurp
Frequent Advisor

Xlib: connection refused by server

Hi frined,

Need ur help once again].
I have taken GUI of a liux machine uding Xbrowser.
We Want to display xclock on xbrowser from other HP Unix machine.
Tryed " xhost + " on linux m/c.
HPUX# DISPLAY=100.11.18.10:0.0;export DISPLAY
HPUX# xclock &
# xclock
Xlib: connection to "100.11.18.10:0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: 100.11.18.10:0.0


Pleasee help

rgds
Ankur
10 REPLIES 10
Stuart Browne
Honored Contributor

Re: Xlib: connection refused by server

Is there a firewall on the Linux box blocking port 6000?

For the moment, that seems the best bet..

Either that, or the Linux box doesn't have the IP address 100.11.18.10
One long-haired git at your service...
Huc_1
Honored Contributor

Re: Xlib: connection refused by server

let me try to explain this from an example

let said you are running X on a Linux machine A
A ip address is 10.10.10.10

Your HP-UX is machine B (You can be on character base terminal or in an X Gui environment it does not matter)
B ip address is 10.10.10.22

On A machine (10.10.10.10) type
xhost +10.10.10.22

on B machine (10.10.10.22) type
export DISPLAY=10.10.10.10:1.0
xclock &

This should work,if you do not have firewall or network problems and you are using bash on machine A, this probably the case

On machine B adapt export syntax to the shell you are running.


J-P Huc
Smile I will feel the difference
Chakravarthi
Trusted Contributor

Re: Xlib: connection refused by server



i have seen this error, if $HOME is incorrect. not sure why this will give that error, but check $HOME variable
Paul Cross_1
Respected Contributor

Re: Xlib: connection refused by server

Another thing you can do, assuming you use ssh configured to forward X11 (if not see the sshd_config file): ssh -X . This will forward X through your ssh connection and will set the DISPLAY variable automatically. It's a beautiful feature!
ankurp
Frequent Advisor

Re: Xlib: connection refused by server

Checked all the issues long back.
1) NO firewall , also m/c listenin on 6000 port

# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 localhost:32768 *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:x11 *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost:smtp *:* LISTEN
tcp 0 0 *:xfs *:* LISTEN
udp 0 0 *:xdmcp *:*
udp 0 0 *:sunrpc *:*
2)HOme variable set properly.

HUC : thanks for ur breif desriptin of the scenario.
I have taken X session of linux m/c thr. Xbrowser.

# ovw
Xlib: connection to "10.61.1.1:0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: 10.61.1.1:0.0
Error: Couldn't find per display information
I m gettin the same error.


pls help

rgds
Ankur

Matt Palmer_2
Respected Contributor

Re: Xlib: connection refused by server

Hi,
this may not apply to you, but I have had the scenario where the default user on the system must xhost+ then su must also xhost before Xlib will allow connections to be sent in and out of the system.

eg:if I just su and try to issue xhost+ I get the same error that you do. But if I xhost as default user then su and xhost+, run my export and run the required XApp, I do not get any errors. Maybe you could try something similar??

Hope this helps

regards

Matt
ankurp
Frequent Advisor

Re: Xlib: connection refused by server

Okay check this out.
I was takin a Xsession of linux machine using Xbrowser on a win2k m/c, so when i was doing export dsiplay on the hpux m/c , of whose i was tryin to export display for OVW, i should have given ip of win2k m/c with :2.0 whereas i was givin ip of the linux m/c, which was wrong.

Can i get more Xwindows sessions of the same linux machine using Xbrowser, now when i m tryin that it is just showing an display with mouse representin X symbol.

rgds
Ankur
Now
T G Manikandan
Honored Contributor

Re: Xlib: connection refused by server

do the below things

on the linux host do a

#xhost +

then from the HPUX machine do a

#export DISPLAY=:0.0
#xclock
P M Prabu
Occasional Advisor

Re: Xlib: connection refused by server

hai ankurp

u check the firewall in the LINUX server by using #iptables -L

i think some firewall setting only refusing the connection

regards
prabu
ankurp
Frequent Advisor

Re: Xlib: connection refused by server

Hi all dear frineds

Can i get more Xwindows sessions of the same linux machine using Xbrowser, Right now i can take only 1 session from windows m/c using Xbrowser. When i try to take one more seesion
it is just showing an display with white and black dots with a X symbol representin mouse.

rgds
Ankur