Re-enable X11 on Max OS X

Every now and then Apple disables the TCP ports of the X server. I don't know why, but at least two updates from Apple disabled this now.

You know TCP is disabled if you do

netstat -na|grep 6000

and you see nothing. If X11 would be listening you should see something like:

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

Also when you try to start an X11 app (like xcalc) from the terminal and you have set the DISPLAY variable to localhost:0, then you will see this if the X server is not listening on TCP (after a few seconds):

Error: Can't open display: localhost:0

To enable TCP on the Xserver type this into a terminal:

defaults write org.x.X11 nolisten_tcp 0

and then restart you X server. Now xcalc should start immediately.

Keine Kommentare: