gui-apps not opening, when i login as "su -"

Status
Not open for further replies.

praka123

left this forum longback
Hello All,
I use Debian Sarge .i cant open any gui apps for eg;gedit as "su -"
i tried exporting $DISPLAY value
Code:
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:9926): Gtk-WARNING **: cannot open display:
Code:
prakash@sarge:~$ xhost +
access control disabled, clients can connect from any host
now if i try opening gedit it will open.so any help..
 

eddie

El mooooo
it is a security feature so that users don't run GUI apps as Root. Anyways, have a look here for a few solutions
*www.mepislovers-wiki.org/index.php?title=XHost_errors_when_trying_to_run_programs_as_root
 
OP
praka123

praka123

left this forum longback
Nyways i already installed sux,which allows to run gui-apps when login as :
Code:
prakash@sarge:~$ sux -
Password:
sarge:~# gedit
but where do those security things cant we modify for logon..i understand that acl is enabled in default for most distros..but they allow running progs as "su",what is wrong with "su -"..thanks all.
 

GNUrag

FooBar Guy
Your X Server is not allowing another user to open Your dosplay.

You need to disable X authentication.

$ xhost +

and then switch users;

Directly giving su retains your original user's environment variables, and su - loads the new user's environment profile. Hence the disparity.
 
OP
praka123

praka123

left this forum longback
I dont want any compromise in security..so no "xhost +".for now happy with "sux -".i use this command as a shortcut in my gnome taskbar with "run in terminal ticked",so that if i click it show a passwd prompt and directly i can be root.this is for some purposes like
Code:
sarge:~# pon dsl-provider
and many uses.i am accustomed this way.thanks to all.but no real answer came :?
 
OP
praka123

praka123

left this forum longback
GNUrag said:
What was your problem?

not a problem. a doubt-how can we enable "su -" to open gedit or any such xapps.thats what i am trying from starting of thread :)
 

GNUrag

FooBar Guy
$ gksu gedit
$ gksudo gedit

Use any of the two, ideally put then as command for new launchers.

Does this solve your problem?
 
Status
Not open for further replies.
Top Bottom