Re: how to find out what port the X server is listening on?
Re: how to find out what port the X server is listening on?
- Subject: Re: how to find out what port the X server is listening on?
- From: Fabian Wenk <email@hidden>
- Date: Thu, 30 Jan 2014 20:10:47 +0100
Hello
On 30.01.2014 19:38, Brandon Allbery wrote:
On Thu, Jan 30, 2014 at 1:33 PM, Bill Janssen <email@hidden> wrote:
Still haven't figured out how to find out what port the X server is
listening on without resorting to some awful heuristics.
I think your best bet might be `lsof -a -i -c Xquartz`.
I did test a few things. After enabling "Allow connections from
network clients" in the XQuartz/X11 preferences you need to
restart XQuartz/X11.app. But the above command does not show
anything, but the following does (sorry for the line wraps of the
output):
$ lsof -a -i -c X11
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE
NAME
X11.bin 10308 fabian 1u IPv6 0x6e4f56961d10cfed 0t0 TCP
*:6005 (LISTEN)
X11.bin 10308 fabian 10u IPv4 0x6e4f56961cacd38d 0t0 TCP
*:6005 (LISTEN)
During my tries it started with port 6001 and cycled through to
6003 and then 6005 (only uneven port numbers have been used).
Independent of the settings in XQuartz preferences the $DISPLAY
variable is always only set to the launchd socket like this:
$ echo $DISPLAY
/tmp/launch-0AKC9l/org.macosforge.xquartz:0
As on OS X the fast user switching could be enabled, it would be
possible to have more then one XQuartz/X11 running (each user
does run his own) at the same time. This is probably the reason
for different behavior then on a "native" X11 (Unix / Linux)
system, that the port numbers are increased on each re-start of X11.
bye
Fabian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden