Mailinglist Archive: opensuse (3394 mails)
|< Previous||Next >|
Re: [SLE] root denied
- From: eilert@xxxxxxxxxxxxxxxxxxxxxxxx (Eilert Brinkmann)
- Date: 29 Mar 2000 20:27:34 +0200
- Message-id: <xttaejhmy21.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Francesco <fgs@xxxxxxxxxx> wrote:
> I thought this was impossible but it now seems that if I su to root in an
> xterm and then try and run emacs I am denied permission. I can run emacs ok
> from an xterm as just me (also from kde's alt+F2)
Yes, this is possible and very normal. It has to do with the way
access control is done by the X server, not with normal file
permissions that are irrelevant for root.
> Here is the error message:
> Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> emacs: Cannot connect to X server :0.0.
> Check the DISPLAY environment variable or use `-d'.
> Also use the `xhost' program to verify that it is set to permit
> connections from your machine.
Usually the access control should be done based on the secret values
in the file ~/.Xauthority. Since root uses it's own .Xauthority file
and not the user's one (which is used by the X server), the access is
denied. You can solve this problem by setting the environment variable
XAUTHORITY in the root shell to the user's .Xauthority like this:
This way root uses the user's .Xauthority (which is possible -- unless
the user's home directory is mounted via NFS -- because the
permissions of this file are not effective against root :-) ) and can
connect to the X server.
If you have installed an ssh server which allows root login and X11
forwarding, you can use
ssh -l root localhost
instead of su and don't need to take any other measures. There are
some other possible solutions, but IMHO these are the cleanest ones.
Eilert Brinkmann -- Universitaet Bremen -- FB 3, Informatik
eilert@xxxxxxxxxxxxxxxxxxxxxxxx - eilert@xxxxxxx - eilert@xxxxxxxxxxxxxx
To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
|< Previous||Next >|