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

Re: DISPLAY variable after su -



"Jimmy D. Burrell" <jburrell sprynet com> writes:

> How *do* you make the DISPLAY variable automagically be set to =
> :0.0 after an 'su -' from a normal term?

Just add 

export DISPLAY=:0 

to /root/.profile.

It won't do any good if you're logged in from another machine, and I'm
not sure if there's a good way to get su - to inherit anything from
the environment... the point of su - is to get rid of all that.

Me, I just use 'su' and have my normal path include /sbin and
/usr/sbin... that tends to be the only thing I want from root's
environment, and there are useful programs there for non-root users.
(Esp. on other Unices which put ping and traceroute there!)

-- 
Alan Shutko <ats acm org> - Looking for a job in Long Island!
Check http://rescomp.wustl.edu/~ats/ for a resume.
RAM wasn't built in a day.



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