> On Mon, 31 Jan 2005 11:35:36 +1300
> yuri <[EMAIL PROTECTED]> wrote:
>
> > On Mon, 31 Jan 2005 11:28:48 +1300, Jim Cheetham wrote:
> > > Some people prefer to work from the command
> > > line, even if they're in an X session, so a method of
> > > elevating privs that also preserves $DISPLAY and X
> > > auth is useful.
> > > Having said that, on my workstation sudo preserves
> > > $DISPLAY, and X auth works for me. I don't know why
> > > :-) Seems OK over ssh too, so I haven't worried about
> > it too much!
> > su works for me in xterms, over ssh, etc. never needed
> sux myself.
>
> so you can run an X app after su'ing in an xterm? thats
> unusual because unless you take some explicit step other
> users (incl root) are not allowed to access your X server.

Depends on your distro.  Fedora Core 3 (and 2 and 1 and rh8
from memory) uses pam_xauth to forward xauth keys between
users.

You'll find a line such as
session   optional   /lib/security/$ISA/pam_xauth.so
in the /etc/pam.d/* files, which will properley forward the
authority settings for the users active display.

Other distros may do similar, although pam_xauth appears to
be a RedHat thing.

> Maybe because of the enigmatic way this thread was started
> , some people have missed the point. sux works the same as
> su, but also does some little tricks with X authorisation
> so the the user you sux'd to can run X apps. its safer
> than using xhost + or xhost +localhost.

Well, it helped me out.  I was just symlinking to my
Xauthority file under Debian and setting DISPLAY=:0.  Not
hard, but it is nicer to have it automatically done
properley for me (not that I have to do it often).

Daniel

Reply via email to