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

Re: Allowing root to display to X...



On Sun, 12 Sep 1999, Aaron Van Couwenberghe wrote:

> Hi all -
> 
>   I remember hearing once that if you linked your ~/.Xauthority to
> /root/.Xauthority, a root shell would be able to run X applications (within
> your regular user's X session). However, I tried this, and it doesn't seem
> to work for me.
> 
> Any ideas? I'm trying to install Sun's latest Star Office.

This idea is a nasty hack and it should not be used. Instead, try using
ssh:

1. Install the ssh package if you haven't already done so (it's in the
   non-US/non-free section).

2. Add these two lines to either /etc/ssh/ssh_config or ~/.ssh/config
   (Debian is the only system I know of that has X11 forwarding turned off
   by default in ssh):

Host localhost
  ForwardX11 yes

3. Inside an xterm, rxvt, eterm or whatever, run this command:

ssh -l root localhost

Now ssh will automatically take care of the DISPLAY variable and X
authorisation.

It may seem overkill to use ssh to log in as root on the local system, but
it is the only method I've come across that addresses this problem in a
nice and clean way.

Remco
-- 
rd1936:  2:30am  up 2 days,  3:45,  5 users,  load average: 1.32, 1.38, 1.51


Reply to: