Networking X

Setup Server

Make sure X is run without the '-nolisten tcp' option.
type

ps -ef | grep X
(capital X) to see the X command line.

If the '-nolisten tcp' option is on then it is probably being set by gdm. You can add

DissallowTCP=false
to your /etc/X11/gdm/gdm.conf file to change this.

You will need to restart X (crtl-alt-backspace or reboot) before this will take effect.

xhost

To allow a particular host access to an x server, run (on the host):

xhost +<c_hostname>
I think <c_hostname> can either be a hostname or an IP address. It is the name of the client machine - the machine where you will run x clients (x programs). Note that you RUN it on the X server machine (the one hooked up to the monitor and keyboard).

You can use

xhost +
to enable access from any machine, but this is potentially dangerous. Turn it off again with
xhost -

This takes effect immediately (no need to reboot).

DISPLAY

Set the DISPLAY environment variable on the machine where you run the client program. It should be set like this:
export DISPLAY=<s_hostname>:0.0
where <s_hostname> is the name (or IP address) of the X server machine.

Ports

The client connects to the server over port 6000 (if the display number is not 0 then it is 6000 + display_number). Try telnetting to this port to see if the X server is listening.