Detecting Valid Server/Screen

This is a discussion on Detecting Valid Server/Screen within the X forums, part of the Help category; 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, ...

Go Back   Unix Linux Forum > Unix > Linux > Help > X

FixUnix.com - Unix Linux Forums

Unix Content Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-30-2007, 08:32 PM
Default 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
Reply With Quote
  #2  
Old 09-30-2007, 08:32 PM
Default 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 With Quote
Reply

Thread Tools


All times are GMT -5. The time now is 12:36 AM.

In an effort to better serve ads to our visitors, cookies are used on Fixunix.com. For more information, check out our Privacy Policy.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Ad Management by RedTyger