LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Sudo and Slackware 10.1 (https://www.linuxquestions.org/questions/slackware-14/sudo-and-slackware-10-1-a-296300/)

mikz 03-01-2005 10:31 AM

Sudo and Slackware 10.1
 
When using SUDO to run gedit or other X-programs I get the following error:

bash-3.00# sudo gedit
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

I can see that its an Xorg problem.

Can someone suggest a solution.?

xowl 03-01-2005 10:52 AM

U cannot connect to the X server coz U dont know which X server is.

Try this:

xhost +
su -
enter Ur passwd

export DISPLAY=:0.0
gedit

mikz 03-01-2005 11:21 AM

Isn't there a more permanent solution. I didn't have the problem underr slackware 10.

keefaz 03-01-2005 11:54 AM

How did you set your /etc/sudoers file ?
I actually run slack 10.1 and sudo gedit works just fine

mikz 03-01-2005 12:14 PM

I set it using visudo. Entered my user 'abc' as:
# User privilege specification
root ALL=(ALL) ALL
abc ALL=(ALL) ALL

then I :wq

sudo works if I for example s'udo mc', but when I 'sudo gedit' I get the mentioned errors.

mikz 03-01-2005 12:17 PM

Just a further point. When quitting visudo I get the message:

bash-3.00# visudo
skipping 2 old session files
reading /etc/sudoers.tmp

Can these old sessions have something to do with it.?

mikz 03-01-2005 12:23 PM

I think that I have partly solved the problem. If I now type 'sudo gedit', it then asks me for the password.
After entering the password for user 'abc' the prgram starts up. Now all I have to do is figure out how to di it without entering the password everytime.

keefaz 03-01-2005 01:18 PM

I think it is bad concept to want edit files with root privileges without password


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