LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-08-2005, 10:40 AM   #1
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Rep: Reputation: 30
`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
 
Old 10-08-2005, 12:10 PM   #2
mmmm
Member
 
Registered: Oct 2004
Location: Poland
Distribution: Slack 10.1, Mandrake 10.1
Posts: 118

Rep: Reputation: 15
before su type :

"xhost +"

It allows all users to access X server.
 
Old 10-08-2005, 12:33 PM   #3
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
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
 
Old 10-08-2005, 12:38 PM   #4
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Original Poster
Rep: Reputation: 30
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
 
Old 10-08-2005, 12:44 PM   #5
anindyanuri
Member
 
Registered: Jan 2005
Location: India
Distribution: Kubuntu Gutsy
Posts: 450

Original Poster
Rep: Reputation: 30
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
 
Old 10-08-2005, 12:59 PM   #6
qwerty
Member
 
Registered: Feb 2005
Location: England
Distribution: Ubuntu 5.10
Posts: 80

Rep: Reputation: 15
sux

You can also use
Code:
sux
rather than
Code:
su
when you need to change to root and run X applications.
 
Old 10-08-2005, 05:00 PM   #7
GentooIsGreat
Newbie
 
Registered: Oct 2005
Posts: 24

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++: compiler returns an error, can't figure out why frankie_DJ Programming 6 10-16-2005 09:15 AM
# /sbin/lilo returns incorrect error message Bruce Hill Slackware 5 11-24-2004 02:29 PM
XConfigurator returns error yodathecoda Linux - Newbie 2 08-09-2004 04:07 PM
k3b make returns error, am I missing something? corso64 Linux - Software 3 07-02-2004 10:24 AM
open function returns error sudheernair Programming 2 05-07-2004 11:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration