[ale] X application as root

Jason Day jasonday at worldnet.att.net
Mon May 5 21:06:41 EDT 2003


On Mon, May 05, 2003 at 08:30:55PM -0400, David Corbin wrote:
> Geoffrey wrote:
> 
> >One quick solution to this problem is to copy the .Xauthority file 
> >from the home directory of the login that is running X to the root 
> >directory.
> 
> Thanks.  That did the trick.  As I don't often need to do this, this 
> will probably be adequate, but I'm curious about a more long-term 
> approach.....

Or, you could export XAUTHORITY=~user/.Xauthority (where user is your
login name).

The only somewhat elegant long-term solution I can think of is to export
XAUTHORITY in your (not root's!) .bashrc.  Then when you su to root, the
XAUTHORITY environment variable will still be pointing at your home
directory (I think), as long as you don't su -.

I think some versions of su, or maybe pam, automatically copy the user's
.Xauthority file to a random file in root's home and set XAUTHORITY
appropriately, but I haven't investigated this.

HTH,
Jason
-- 
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net
 
"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list