Detecting Valid Server/Screen - X

This is a discussion on Detecting Valid Server/Screen - X ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Detecting Valid Server/Screen

  1. 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
    http://www.cs.utk.edu/~cjohnson

  2. Re: Detecting Valid Server/Screen

    Chris Johnson wrote:
    >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!


    netstat -l (+ any other appropriate parms for your situation) will list
    apps listening on tcp port 6000+ and unix domain /tmp/.X11-unix/X0 +


+ Reply to Thread