Re: allowing X display from su'd environment
On Sat, Nov 09, 2002 at 12:40:12PM +0700, Jean Christophe ANDR? wrote:
> Matt Zimmerman ?crivait :
> > This disables access control in the X server. This is, almost always, a
> > very bad idea.
>
> A better way to allow it (when you switch from normal to root user) :
>
> test@localhost:~$ su -
> root@localhost:~# xauth merge ~test/.Xauthority
> root@localhost:~# export DISPLAY=:0.0
> root@localhost:~# xterm # or whatever Xwindow program you want to run
>
> I can remember there was some 'su' feature doing it automagically somewhere
> (with RedHat, Mandrake or another one)...
An easier wethod:
$ su
# export XAUTHORITY=~user/.Xauthority
--
- mdz
Reply to: