Saturday, June 13, 2009

Getting xhost to work on linux fedora 11

By default Fedora doesn't allow X11 to receive tcp connections.

This means if you try and run applications on another computer and display the window on your own, it won't work.

Your IP is 192.168.100.100
The other computer is 192.168.200.200

The typical step for running an xhost session is

1) On your computer you use this command to allow them access:
xhost + 192.168.200.200

2) On the other computer this commands tells it where to display all new windows:
export DISPLAY=192.168.100.100:0.0

3) On the other computer you run an application.
gnome-terminal

Problem is you get this message on the other computer:
> Can not open display:

And the terminal window doesn't appear no your computer.

Solution:
Allow TCP connections to X11 and open up the port 6000 in the firewall.

1) Edit /etc/gdm/gdm.schemas

2) Change

security/DisallowTCP
b
false


from true to false

3) In your firewall allow port 6000

4) Log out and log back to restart gdm

5) Now try the xhost commands from above