How to test whether Display is accessible - Xwindows

This is a discussion on How to test whether Display is accessible - Xwindows ; What's a nice method to test, from a shell script, whether the current user can display something on display foo.bar:1.2? -- Felix E. Klee...

+ Reply to Thread
Results 1 to 3 of 3

Thread: How to test whether Display is accessible

  1. How to test whether Display is accessible

    What's a nice method to test, from a shell script, whether the current
    user can display something on display foo.bar:1.2?

    --
    Felix E. Klee


  2. Re: How to test whether Display is accessible

    "Felix E. Klee" writes:

    > What's a nice method to test, from a shell script, whether the current
    > user can display something on display foo.bar:1.2?



    [pjb@thalassa pjb]$ DISPLAY=router:0.0 xhost
    xhost: unable to open display "router:0.0"
    [pjb@thalassa pjb]$ echo $?
    1
    [pjb@thalassa pjb]$ DISPLAY=naiad:0.0 xhost
    access control enabled, only authorized clients can connect
    INET:thalassa.informatimago.com
    LOCAL:
    [pjb@thalassa pjb]$ echo $?
    0
    [pjb@thalassa pjb]$


    --
    __Pascal Bourguignon__ http://www.informatimago.com/

    "You cannot really appreciate Dilbert unless you read it in the
    original Klingon"

  3. Re: How to test whether Display is accessible

    On Fri, 03 Nov 2006 18:21:35 +0100, Pascal Bourguignon wrote:
    > [pjb@thalassa pjb]$ DISPLAY=router:0.0 xhost
    > [...]


    Thanks!

    --
    Felix E. Klee


+ Reply to Thread