LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Check wether a X server is running and ok (http://www.linuxquestions.org/questions/linux-server-73/check-wether-a-x-server-is-running-and-ok-651555/)

johg 06-25-2008 09:04 AM

Check wether a X server is running and ok
 
Basically I need a more reliable way to check wether a X server is ok than using ps/pgrep.
Is there a (standard) application which connects to a X server and exits again giving me the status? Something like "xterm -e exit".

solarkash 06-25-2008 09:27 AM

# xset -q

( q - for query )

It works good for me. The only case it is missing is the shortage of file descriptors.

marozsas 06-25-2008 03:42 PM

what about ....
Code:

export DISPLAY=":0.0"
xdpyinfo

(running on a tty, not on a terminal inside X)

johg 06-29-2008 01:32 PM

Thanks, both answers answer my question and I appreciate your help.


All times are GMT -5. The time now is 09:02 AM.