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

RE: su in X



When you log in as a regular user, and you 'su -' to root, you have to
define you 'export DISPLAY=:0.0' again.  The minus sign after the su command
means that you want to assume root's environment.  So if there is not an
explicit export DISPLAY statement in /root/.bash_profile or /root/.bashrc,
the root environment has no idea what the display should be.

Hope this helps  -mk


> -----Original Message-----
> From: Erik van der Meulen [mailto:e.van.der.meulen@dices.nl]
> Sent: Wednesday, April 11, 2001 5:26 AM
> To: debian-user@lists.debian.org
> Subject: Fw: su in X
> 
> 
> Dear list, this should be easy, but I have not managed yet...
> I run Gnome desktop as a 'regular' user. If I need to do 
> systemsmanagment, I
> do 'su -' in a terminal to get root access. Only if I need to 
> start an X app
> (just installed red-carper), I get an error:
> 
>   Gtk-WARNING **: cannot open display:
> 
> Can anyone suggest how to avoid this? I recall something with export
> display, but do not get it to work...
> 
> Thanks a lot.
> 
> Erk van der Meulen
> 
> NB I probably end up wanting to have a menu-button for this 
> application. Is
> 'sudo' than the way to go?
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact 
> listmaster@lists.debian.org
> 



Reply to: