cancel
Showing results for 
Search instead for 
Did you mean: 

problem with xhost

SOLVED
Go to solution
James_173
Advisor

problem with xhost

Hi,

I have a new installed RH9 system.Now I am having problems starting X client.I login as root.I set the DISPLAY variable by issue
#export DISPLAY=localhost:0.0
then I issue
#xhost
but I got the error message,
xhost: unable to open display "localhost:0.0"

Any ideas,thanks

James
18 REPLIES
Stuart Browne
Honored Contributor

Re: problem with xhost

Log in as root into a GUI or into a CLI?

If it's into the GUI, then you might want to check your firewall rules, making sure that the localhost can talk to it's self un hindered.

iptables -nvL

And why are you setting DISPLAY yourself? If you log in as root, start a terminal, your DISPLAY should already be set.
One long-haired git at your service...
Avinoam
Frequent Advisor

Re: problem with xhost

hello

try running the xhost with the following switches :

1. xhost + this one will enable all connection from all clients

2. xhost +192.168.1.111 this will enable xhost session from 192.168.1.111 only.

there is a better way ( much more secure ) to do this by enabling MIT MAGIC COOKIE. you can read about ir here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

try running the xhost with the following switches :

1. xhost + this one will enable all connection from all clients

2. xhost +192.168.1.111 this will enable xhost session from 192.168.1.111 only.

there is a better way ( much more secure ) to do this by enabling MIT MAGIC COOKIE. you can read about ir here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

try running the xhost with the following switches :

1. xhost + this one will enable all connection from all clients

2. xhost +192.168.1.111 this will enable xhost session from 192.168.1.111 only.

there is a better way ( much more secure ) to do this by enabling MIT MAGIC COOKIE. you can read about ir here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

try running the xhost with the following switches :

1. xhost + this one will enable all connection from all clients

2. xhost +192.168.1.111 this will enable xhost session from 192.168.1.111 only.

there is a better way ( much more secure ) to do this by enabling MIT MAGIC COOKIE. you can read about ir here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

you should add switches to the xhost command :

1. xhost + this one will enable session from all clients

2. xhost +192.168.1.100 this will enable session only from the client 192.168.1.100.

there is much better and secure way to do this by exchangeing the MIT MAGIC COOKIE , you can read about it here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

you should add switches to the xhost command :

1. xhost + this one will enable session from all clients

2. xhost +192.168.1.100 this will enable session only from the client 192.168.1.100.

there is much better and secure way to do this by exchangeing the MIT MAGIC COOKIE , you can read about it here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

you should add switches to the xhost command :

1. xhost + this one will enable session from all clients

2. xhost +192.168.1.100 this will enable session only from the client 192.168.1.100.

there is much better and secure way to do this by exchangeing the MIT MAGIC COOKIE , you can read about it here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

you should add switches to the xhost command :

1. xhost + this one will enable session from all clients

2. xhost +192.168.1.100 this will enable session only from the client 192.168.1.100.

there is much better and secure way to do this by exchangeing the MIT MAGIC COOKIE , you can read about it here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

you should add switches to the xhost command :

1. xhost + this one will enable session from all clients

2. xhost +192.168.1.100 this will enable session only from the client 192.168.1.100.

there is much better and secure way to do this by exchangeing the MIT MAGIC COOKIE , you can read about it here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

you should add switches to the xhost command :

1. xhost + this one will enable session from all clients

2. xhost +192.168.1.100 this will enable session only from the client 192.168.1.100.

there is much better and secure way to do this by exchangeing the MIT MAGIC COOKIE , you can read about it here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

hello

the xhost command is used to open an X session in remote computer, to open X Sesion on the loval voputer you should run the "startx" or "X" commnad.
in order to allow others to run X-Sessions on your computer you should do the following:

you should add switches to the xhost command :

1. xhost + this one will enable session from all clients

2. xhost +192.168.1.100 this will enable session only from the client 192.168.1.100.

there is much better and secure way to do this by exchangeing the MIT MAGIC COOKIE , you can read about it here : http://csrc.nist.gov/publications/nistpubs/800-7/node90.html

good luck

Avinoam
Sababa
Avinoam
Frequent Advisor

Re: problem with xhost

Sorry for the mess !!!
i had few browser problems..

Sorry !
Sababa
James_173
Advisor

Re: problem with xhost

Hi Stuart,

I login as root into the command line on the local computer.I have no firewall enabled.If I issue the xhost without setting the DISPLAY variable.I get the error message,
xhost: unable to open display ""

I really have no idea about that.

Regards,
James

Stuart Browne
Honored Contributor
Solution

Re: problem with xhost

There is no X running. That's why it's failing.
One long-haired git at your service...
Alexander Chuzhoy
Honored Contributor

Re: problem with xhost

Looks like you didn't start the X at all.First of all you have to issue
the command: startx..If you had errors and the X didn't start, run: redhat-config-xfree86
which isa utility that configures the X.
If you want to start a program like xcalc (for example) on your pc from tty1-tty6
then before executing the xcalc run this command:
export DISPLAY=localhost:0
setting DISPLAY variables is ususally done when you want to tell your OS to open grafic programs on other computers.
James_173
Advisor

Re: problem with xhost

I got it.Thanks.

James
Caesar_3
Esteemed Contributor

Re: problem with xhost

Hello!

If you wanna run X client program you must!
run X server that the client will connect to
and then you will see it.

Caesar