Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
login as "su -" ,not able to open gui-apps
I use Sarge 3.1r1 and GNOME.i tried to "su -" and export DISPLAY variable as this:
prakash@sarge:~$ echo $DISPLAY :0.0 prakash@sarge:~$ su - Password: sarge:~# export DISPLAY=:0.0 sarge:~# gedit Xlib: connection to ":0.0" refused by server Xlib: No protocol specified (gedit:10259): Gtk-WARNING **: cannot open display: sarge:~#
- Join Date
- Jul 2005
- Illinois, USA
You might want to use sudo instead i.e.,Code:
$ sudo gedit
Thank You.i know with sudo or su logins it works,so how do i add/export so that i can run gui-apps while looged in as "su -".
apt-get install sux
Then use sux instead of su to change to root in an X console. Sux will take care of everything.Stand up and be counted as a Linux user!
Thanks.I am already using sux.but plain curious whether we can achieve to open gui's from "su -".
- Join Date
- Mar 2006
You need to use xhost to tell the X server to allow connections from other users. You can get info on this by typing "man xhost". Typing "xhost +" will allow anybody to connect. You need to do this BEFORE typing "su -", i.e. in the context of the user that started the X session.