10.5: Enable X11 listening on port 6000 (Mac OS)

Are you having difficulty redirecting X11 to your Mac running Leopard without using ssh -X? Someone figured out that Leopard turns off listening to X11 traffic on TCP port 6000 by default. The following steps will TCP listening back on, so that the X11 server will service a client request.

First see if your server has TCP listening turned off by executing the following command: defaults read org.x.X11 | grep nolisten. The output will read either "nolisten_tcp" = 1; which is bad, or "nolisten_tcp" = 0; which is good. If TCP listening is off, turn it back on. I did this both as root and my default non-root username, as I didn't know which one took precedence:
sudo defaults write org.x.X11 nolisten_tcp 0
defaults write org.x.X11 nolisten_tcp 0
Shut down your X11.app, then in Terminal, type xterm, and as normal, the X11 terminal should pop-up. In the xterm, enable all remote users by typing xhost +. Back in Terminal, type the following to see if the server is now listening for inbound TCP requests: netstat -na | grep 6000. You should see something like this output:
tcp4 0 0 *.6000 *.* LISTEN
tcp6 0 0 *.6000 *.* LISTEN
Now on your remote system things should be as before. Just setup your DISPLAY to point to the Mac and fire away. I assume this is persistent across a reboot, but I didn't try. The original solution was found here by Johannes Overmann.

OSX> defaults write org.x.x11 nolisten_tcp 0
OSX> xhost +
OSX> telnet
AIX> export DISPLAY=
AIX> xclock
It's work.


Anonymous said…
on mavericks you may want to use:

defaults read org.macosforge.xquartz.X11

Popular posts from this blog

Alert Log Shows 'ORA-12751: cpu time or run time policy violation' and Associated MMON Trace Shows 'KEBM: MMON action policy violation. 'Block Cleanout Optim, Undo Segment Scan' viol=1; err=12751'

Failed <<<< >>> Could not execute auto check for display colors using command /usr/X11R6/bin/xdpyinfo. Check if the DISPLAY variable is set.

EBS cloning perl adcfgclone.pl appsTier dualfs