hackorama
hackorama

checkx - Simple X server Connection Diagnostics

Simple hack for checking the state of the connection to an X server. Usefull for checking the status of remote X displays. Along with checking ok to connect or failed to connect, checks if the connection is hanging or if server returned any error.


$./checkx 

Usage:  
        checkx display:x.x [time_out] 

        default time_out is 60 seconds   
Eg:     
        checkx tattoine:0.0 
        checkx naboo:0.0 30 

Returns:  

        0 OK    - can connect   
        1 ERROR - server returned error 
        2 FAIL  - failed to connect  
        3 HANG  - connection is hanging 

        In case of ERROR, the error message can be  
        found in the error log "/tmp/checkx.err"
$

View checkx.c
Get checkx.c



Thursday, 15-Apr-2004 19:49:03 PDT kishan at hackorama dot com