1753716 Members
4825 Online
108799 Solutions
New Discussion юеВ

Re: cannot open display

 
Tonatiuh
Super Advisor

cannot open display

Red Hat Enterprise Linux 4

I am not able to open the xclock working diretly in the server. I already did:

$ export DISPLAY=:0.0

And when I do: $ xclock +

I receive the following message:

xhost: unable to open display

Any idea?
4 REPLIES 4
Justin_99
Valued Contributor

Re: cannot open display

Does the system/display you are logging in from have an Xserver running?

For example from my work laptop IP 10.x.x.1 I login to redhat system at 10.x.x.2 and run

export DISPLAY=10.x.x.1::0.0
xclock &

If I don't have some sort of X-server running on my work laptop I will not be able to get xclock to display back.

Also you might want to run gdmconfig and under security see if disallow TCP connections to X server is checked. This may cause you some problems.
Ivan Ferreira
Honored Contributor

Re: cannot open display

How do you connect to the host, via ssh? If so, then run ssh -X remotehost. If you use ssh -X, you don't need to set the DISPLAY variable.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Tonatiuh
Super Advisor

Re: cannot open display

The problem was solved. The real problem was a parameter of the GUI config:

DisallowTCP
skt_skt
Honored Contributor

Re: cannot open display

where is that configuration exactly?