Nico Galoppo <[EMAIL PROTECTED]> writes:

> --* Owen Taylor (Wed, Oct 03, 2001 at 08:36:24AM -0400) *--
> 
> > You can find out what display/server applications are using by
> > printing the DISPLAY environment variable:
> > 
> >  echo $DISPLAY
> 
> Sorry, I think i misexpressed myself. I'd like to know what display the
> X server is listening on. 

A server running on DISPLAY <N> will typically:

 - listen on the TCP port 6000 + <N>
 - listen on the Unix domain socket /tmp/.X11-unix/X<N>

(It could also be listening on DECNET, OS/2 pipes, etc...
IPv6 support is likely to become standard at some point 
in the future.)

So, by using a command such as 'lsof' it's possible to
figure out what displays a server is listening on.

There is (AFAIK) no way to find this out through the X
protocol, because a server may be available by many names. A
display name is a way of contacting a display. A single
display may well be available as:

 :0          - local unix domain socket
 localhost:0 - Over TCP
 :10.0       - forwarded over ssh
 
> Eg. ssh sets $DISPLAY to
> myhost.domain.org:10.0, while that doesn't work if the Xserver is

Note that ssh acts as a proxy server, so
myhost.domain.org:10.0 will typically be forwarded through
to your real display.

Regards,
                                        Owen
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to