[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Permission Denied



On Thu, 23 Oct 1997, Mario Jorge Nunes Filipe wrote:

> Hi.
> 
> Suppose I have X running. I have a shell and in that shell I telnet to
> the same machine but under a different user. When i try to run any X app
> (say xfig) i guet the following messages :
> 
> Xlib: connection to "neptuno:0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> Error: Can't open display: neptuno:0.0
> 
> How can I change this ?

Say you are running X as user "mario"
If you would telnet or login or su to root, then it is very easy:

export DISPLAY=:0
export XAUTHORITY=~mario/.Xauthority

and you can let root start aplication on the xserver. The .Xauthority
file contains the session owner's magic cookie that is used for
authentification.

If you want to do this as an arbitrary other user, then there is a problem
because an arbitrary user can't read the contents of .Xauthority ( look at
the permissions. )

You can work around this by changing the permission on the file,
but that is not a good solution because it mostly defies its
purpose. Better is copying it to the other user's directory as root and
setting the permissions so that only that user can read it. Then set the
XAUTHORITY variable accordingly and it will also work.

The generic ( and best ) solution is to use xauth. Read the manpage ;-)

Cheers,


Joost
  


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . Trouble? 
e-mail to templin@bucknell.edu .


Reply to: