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

Re: allowing X display from su'd environment



On Sat, Nov 09, 2002 at 10:41:05AM -0500, Matt Zimmerman wrote:
| 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

This won't work, if ~user is NFS-mounted with the
'root_squash'-option, because 'nobody' won't be allowed to read ~users
.Xauthority. 


Regards, 
 Michael


-- 
Michael Eyrich                                    Technische Universität Berlin



Reply to: