X11 under OS X Not Accepting Remote Connections

From The System Administrator Zone

Re-enable X11 on Max OS X

At least two updates from Apple disabled the TCP ports of the X server.

You can verify that TCP is disabled by:

netstat -na|grep 6000

If you see nothing, TCP is disabled. If X11 is listening you should see something like:

tcp4 0 0 *.6000 *.* LISTEN
tcp6 0 0 *.6000 *.* LISTEN

The default settings for X11 can be seen using the defaults command.

$ defaults find org.x.X11
Found 4 keys in domain 'org.x.X11': {
    "cache_fonts" = 1;
    "done_xinit_check" = 1;
    "no_auth" = 0;
    "nolisten_tcp" = 1;
$

To enable TCP on the Xserver:

defaults write org.x.X11 nolisten_tcp 0

and then restart you X server.