This is from a local LUG list:

The safe way of doing this is to use xauth.  xauth will allow you to 
set a magic cookie on your root account such that your X server will 
recognize it as being eligible to access your X server.  

First, as the non-root user who is running X type in an xterm:

xauth list $DISPLAY

which will output the xauth cookies associated with your current
display.  It should look something like:

debian/unix:0  MIT-MAGIC-COOKIE-1  f00004739672dece010d7e1faf01dca9

( note, the magic cookie has been changed to protect the innocent ).  

Then in the xterm where you have used su to become root type:

xauth add $DISPLAY . f00004739672dece010d7e1faf01dca9

( please note the big long number matches the one above ).  

Now your root user can access your X server and display X apps.  Since
the root user is caching the magic cookie in the .Xauthority file in 
roots homedir you will be able to display on this X server instance as
root as long as it keeps running.  


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to