Operating System - HP-UX
1820619 Members
1922 Online
109626 Solutions
New Discussion юеВ

Re: export DISPLAY=hostname:0.0

 
Jim Thrash
Occasional Contributor

export DISPLAY=hostname:0.0

I receive the following error message when attempting to export DISPLAY variable. How can I resolve this and get my GUI to display?

Error: Can't open display: hostname:0.0
Error: Couldn't find per display information
9 REPLIES 9
Sandip Ghosh
Honored Contributor

Re: export DISPLAY=hostname:0.0

Can you resolve your PC name through DNS or nslookup?
From the Server your PC/workstation's addres should be resolved. Otherwise you can try with the IP add of the PC/workstn.

Sandip
Good Luck!!!
A. Clay Stephenson
Acclaimed Contributor

Re: export DISPLAY=hostname:0.0

Three possible causes:

1) hostname is not defined in DNS, /etc/hosts, or NIS - whatever you are using for hostname resolution

2) There is no Xserver running on hostname

3) You need to do an xhost + on hostname to allow clients to connect. Man xhost for details. - I'm betting on this one.
If it ain't broke, I can fix that.
MANOJ SRIVASTAVA
Honored Contributor

Re: export DISPLAY=hostname:0.0

Hi Jim

can you do a nslookup < hostname > , or you can do a export DISPLAY=a.b.c.d:0.0 where abcd is teh IP adress of the intellignet terminal you are using.Also after setting it jsut confirm that it ahs been set ot the right value by env | grep DISPLAY.


Manoj Srivastava
David Burgess
Esteemed Contributor

Re: export DISPLAY=hostname:0.0

You need to run the command

xhost+

on the server you are trying to display to.

Regards,

Dave.
hpuxrox
Respected Contributor

Re: export DISPLAY=hostname:0.0

So what's going wrong? Well, X uses the hostname in the DISPLAY variable to look up the address to which to send display information. That hostname is resolved by /etc/hosts, nis or dns. If the hostname resolves to the IP address of some external interface, everything works great. X opens a TCP/IP connection correctly.

If the host is not located in /etc/hosts or dns then you get the error.

Try exporting to the IP address and see if you recieve the same error. My guess is not.

pap
Respected Contributor

Re: export DISPLAY=hostname:0.0

RUn

xhost + on your machine.
then export display from remote machine.

Check the remote machine entry is in your /etc/hosts.

-pap
"Winners don't do different things , they do things differently"
Jeff Schussele
Honored Contributor

Re: export DISPLAY=hostname:0.0

Hi Jim,

Yep, My $ on you need to xhost + on the exporting host.
Course if you
export DISPLAY=xxx.xxx.xxx.xxx:0.0
and then get the display - it was name resolution & all bets are off.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Wodisch
Honored Contributor

Re: export DISPLAY=hostname:0.0

Hi,

well, maybe the X-werver on the target machine is NOT running on ":0.0", but perhaps ":1.0"???
Use "netstat -an|grep 600|grep LISTEN" locally on the machine you want to reach. There should be a process listening on a port in the range 6000-6999. If it is "6000" then the ":0.0" is propably correct, but if it is "6001" or "6002" then you'll have to use ":1.0", resp. ":2.0" - the rule is "6000 + server number"...

HTH,
Wodisch
Niraj Kumar Verma
Trusted Contributor

Re: export DISPLAY=hostname:0.0

Hi try exporting using ip address insted of host name

export DISPLAY=xx.xx.xx.xx:0.0


Look like your system is not able to resolve the name to ip.or put the host entry in /etc/hosts and make sure in your /etc/nsswitch.conf

for the host search order

hosts: files dns nis


-Niraj
Niraj.Verma@philips.com