Access DISPLAY after 'su -' - X

This is a discussion on Access DISPLAY after 'su -' - X ; Hi, I've been able to use the same DISPLAY ':0.0' for myself and after I su as root. I don't know how I did it, but it did work until RedHat 9 (XFree86-4.3.0-2.90.43). But now, I'm in Debian testing (X ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Access DISPLAY after 'su -'

  1. Access DISPLAY after 'su -'

    Hi,

    I've been able to use the same DISPLAY ':0.0' for myself and after I su as
    root. I don't know how I did it, but it did work until RedHat 9
    (XFree86-4.3.0-2.90.43).

    But now, I'm in Debian testing (X is xfree86 4.3.0.dfsg.1-1), and I can't
    use DISPLAY ':0.0' any more after I su as root.

    Xlib: connection to ":0.0" refused by server
    Xlib: No protocol specified

    How can I fix it?

    I found one option after googling, but it is "use ssh" -- I don't like
    it:

    - it's a overkill
    - allowing root to ssh in is not suggested

    So, can anybody help?

    Thanks

    --
    Tong (remove underscore(s) to reply)
    *niX Power Tools Project: http://xpt.sourceforge.net/
    - All free contribution & collection

  2. Re: Access DISPLAY after 'su -'

    * Tong * wrote:
    >Hi,
    >
    >I've been able to use the same DISPLAY ':0.0' for myself and after I su as
    >root. I don't know how I did it, but it did work until RedHat 9
    >(XFree86-4.3.0-2.90.43).
    >
    >But now, I'm in Debian testing (X is xfree86 4.3.0.dfsg.1-1), and I can't
    >use DISPLAY ':0.0' any more after I su as root.
    >
    >Xlib: connection to ":0.0" refused by server
    >Xlib: No protocol specified
    >
    >How can I fix it?
    >
    >I found one option after googling, but it is "use ssh" -- I don't like
    >it:
    >
    >- it's a overkill
    >- allowing root to ssh in is not suggested
    >
    >So, can anybody help?
    >
    >Thanks


    Maybe "export XAUTHORITY=$USER/.Xauthority" before you su, or maybe
    do this in your .bashrc?


  3. Re: Access DISPLAY after 'su -'

    On Fri, 02 Jul 2004 16:54:36 -0500, Kip Rugger wrote:

    >>But now, I'm in Debian testing (X is xfree86 4.3.0.dfsg.1-1), and I can't
    >>use DISPLAY ':0.0' any more after I su as root.

    >
    > Maybe "export XAUTHORITY=$USER/.Xauthority" before you su, or maybe
    > do this in your .bashrc?


    Well, didn't work before su, but, YES, it works after su. Thanks!


    --
    Tong (remove underscore(s) to reply)
    *niX Power Tools Project: http://xpt.sourceforge.net/
    - All free contribution & collection

+ Reply to Thread