LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   `su' returns error message (https://www.linuxquestions.org/questions/linux-software-2/%60su-returns-error-message-370937/)

anindyanuri 10-08-2005 10:40 AM

`su' returns error message
 
I am using Fedora Core 4

I am not able to do any root works with `su' command.

I am giving the command proviided with password, I am getting the # prompt but nothing works.

All the time I am getting a message that "Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified".

For better understanding, I am trying to open `/boot/grub/grub.conf',
Code:

[root@localhost anindyanuri]# gedit /boot/grub/grub.conf
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


(gedit:4047): Gtk-WARNING **: cannot open display:
[root@localhost anindyanuri]#

another example, trying to open synaptic package manager
Code:

[root@localhost anindyanuri]# synaptic
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


(synaptic:4181): Gtk-WARNING **: cannot open display:
[root@localhost anindyanuri]#

what is the problem?



regrds
anindyanuri

mmmm 10-08-2005 12:10 PM

before su type :

"xhost +"

It allows all users to access X server.

phil.d.g 10-08-2005 12:33 PM

The problem is that X will only allow programs started by the user who started X to connect. root didn't fire up X therefore root can't run a gui program.

`xhost +` relaxes these permissions so that anyone can fire up a gui program.

You should consider using a CLI editor such as vi, nano or pico rather than use `xhost +` especially if your computer is in a networked environment

anindyanuri 10-08-2005 12:38 PM

Thank you mmmm

it worked ......... and now i am able to do root works with `su'

So, the problem is now solved.

Thank you once again.

regrds
anindyanuri

anindyanuri 10-08-2005 12:44 PM

Quote:

Originally posted by phil.d.g
The problem is that X will only allow programs started by the user who started X to connect. root didn't fire up X therefore root can't run a gui program.

`xhost +` relaxes these permissions so that anyone can fire up a gui program.

You should consider using a CLI editor such as vi, nano or pico rather than use `xhost +` especially if your computer is in a networked environment

Great explaination!!!

But I have applied `xhost +' before your mail.

Anyway, I'll remember your point.

regrds
anindyanuri

qwerty 10-08-2005 12:59 PM

sux
 
You can also use
Code:

sux
rather than
Code:

su
when you need to change to root and run X applications.

GentooIsGreat 10-08-2005 05:00 PM

In some distributions (eg Gentoo), to use su you need to be a member of the wheel group (or some similar group).


All times are GMT -5. The time now is 05:05 PM.