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

Re: gui progs as root in x under normal user?



On Sat, May 22, 1999 at 10:39:50PM -0500, fairfax@pclink.com wrote:
> > On Mon, 17 May 1999 19:18:48 +0200 Peter Granroth wrote:
> > > How do i start graphical programs under X as root while I'm logged in as a
> > > normal user?
> > 
> > If you put the following in root's .bashrc (assuming you use bash),
> > you can start X programs when su root in a users X session:
> > 
> > if [ "$USER" != "root" ] ; then
> >     export XAUTHORITY=`eval echo ~$USER/.Xauthority`
> > fi
> >  
> Just curious...I can do su root from a user's X session, but I have nothing
> like that in root's .bashrc, nor in /etc/profile.  (I do use bash.)  Is this
> happening through some other mechanism, or am I missing a file?

This has nothing to with the ability to su to root from a users X
session, but to be able to start X clients as root /from/ the su
root shell. Without the above in root's .bashrc (or some other
equivalent solution), you will not be able to do that.

HTH
-- 
----------------------------------
+         Peter Granroth         +
+   mailto:granis@soke.dhs.org   +
+       http://soke.dhs.org      +
----------------------------------


Reply to: