Re: Permission Denied
On Thu, 23 Oct 1997, Mario Jorge Nunes Filipe wrote:
> 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:
and you can let root start aplication on the xserver. The .Xauthority
file contains the session owner's magic cookie that is used for
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 ;-)
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
firstname.lastname@example.org . Trouble?
e-mail to email@example.com .