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

Re: Magic cookies and running programs under X as root



Christopher R. Barry wrote:
> For many years, whenever I have tried to run a program under X as root I get
> a message like:
> 
>   Xlib: connection to ":0.0" refused by server
>   Xlib: Client is not authorized to connect to Server
>   Error: Can't open display: :0.0
	
	There was a thread on this recently, so for all the details you
might want to check the mailing list archives. 
	But basically X clients authenticate themselves by using the
.Xauthority file. So if the user running the X session su's to root,then
the user's .Xauthority file (with the magic cookies) is not found in /root,
and root can't get authorized.
	One way is to link roots .Xauthority to the users .Xauthority.
But there are a couple of other suggestions in the archives. 
-- 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Reply to: