Detecting Valid Server/Screen
Is there a clean way to determine if a possible setting for the DISPLAY
environment variable is valid? It's easy to check the output of ps for
instances of X, but how can we find which display those X servers are
serving?
Thanks for any help!
--
Chris Johnson
cjohnson AT cs DOT utk DOT edu
[url]http://www.cs.utk.edu/~cjohnson[/url]
Re: Detecting Valid Server/Screen
Chris Johnson <call@me.k> wrote:[color=blue]
>Is there a clean way to determine if a possible setting for the DISPLAY
>environment variable is valid? It's easy to check the output of ps for
>instances of X, but how can we find which display those X servers are
>serving?
>
>Thanks for any help![/color]
netstat -l (+ any other appropriate parms for your situation) will list
apps listening on tcp port 6000+ and unix domain /tmp/.X11-unix/X0 +