> Given the same scenario, If I 'su -' I cannot run the X application as the
> DISPLAY env is not set.
> This set me out to learn where the DISPLAY env variable is set. I cannot
> find it. Where / how is it set ?
>
> Also, is the reason there is a difference between the behavior of 'su' and
> 'su -' with regard to DISPLAY is that the 'su' would inherit the DISPLAY
env
> from Joe, where as root has no DISPLAY env ?
Bingo. 'su -' gives you root's environment, but unless the DISPLAY variable
is set in the default shell config files for root, you get no DISPLAY.
Try adding :
DISPLAY=yourbox:0
export DISPLAY
to root's .bash_profile (or the config file for root's shell on your system)
and then 'su -' will set the variable correctly.
You may have to add the line 'xhost +yourbox' to your personal .bash_profile
to give root access to your X display as well.
Read the X man pages for the (relatively minor) security implications of
doing so.
Eric Cifreo
Austin, TX
>What's the reason for root
> not having a DISPLAY env ?
Cause you didn't set it. ;0)
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.