Remco Blaakmeer wrote:

> On Thu, 15 Jan 1998, Jens B. Jorgensen wrote:
>
> > Remco Blaakmeer wrote:
> >
> > > The solution is, of course:
> > >
> > > XAUTHORITY="${HOME}/.Xauthority"
> > > (AFAIK, $HOME is already set when /etc/profile is run)
> > >
> > > But this is the default location. I think it is better to not set the
> > > variable at all if you don't have a good reason to set it.
> >
> > Ah, but in the situation I described, you want to point to the logged-in 
> > user's
> > Xauthority, not roots, so using your command above will not work since once 
> > you su HOME
> > will be root's home directory. Also as you point out you don't need to set 
> > it. I believe
> > xdm provides it. Also, you must make sure to 'export' the variable.
>
> So, you want to something like
>
> export XAUTHORITY=~user/.Xauthority
>
> where `user' is the name of the user that is logged in to the X display?
>
> Don't do that. The minute root writes to that file (when root logs in to X
> or uses the xauth command), it becomes owned by root and the user can't
> log in to X anymore.
>
> What you could do is using ssh. This command will do the trick:
>
> xterm -title Root -n Root -e ssh -l root localhost
>
> You can add it to a Fvwm(1,2,2-95) menu or button bar.
>
> ssh will take care of X forwarding automatically, no matter if you
> 'connect' to the localhost or another host. In any ssh session, you can
> simply do something like "xterm &" and the window will appear on the local
> screen.

Sir you are missing the point. Stop confusing the guy. What you're saying is 
based upon an
assumption that this trick would be used whenever root logged in. Now why would 
that be
necessary? If you log into xdm as root you won't *need* to futz with this stuff 
because xdm
will have already set it up for you. The *only* reason he'd be doing this is 
because he su'd
to root while logged in as another user. Note that I told him to do this 
*after* he su'd to
root. In this case, .Xauthority will not be written to, only read. And, why the 
hell would he
want to use ssh? He's doing this on the same frigging machine. He said he 
logged in with xdm
right? Damn it I hate it when people spread disinformation like this.

--
Jens B. Jorgensen
[EMAIL PROTECTED]



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to