Unix Technical Forum

How do I eliminate this error in Slack 9.1

This is a discussion on How do I eliminate this error in Slack 9.1 within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> If I su to root and try to run nedit I get an error root@---------# nedit Xlib: connection to ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 12:18 PM
A-B C.
 
Posts: n/a
Default How do I eliminate this error in Slack 9.1

If I su to root and try to run nedit I get an error
root@---------# nedit
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
NEdit: Can't open display

But, if I first run
xhost +localhost
and then go to root and run nedit I'm OK.

In Debian there is some obscure simlink you can make that will solve this...
but I forget what it is. Is there a similar fix for Slack?

Thanks,
Al


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 12:18 PM
Neil W Rickert
 
Posts: n/a
Default Re: How do I eliminate this error in Slack 9.1

"A-B C." <atakeoutcanton@adams-blaketakeout.com> writes:

>If I su to root and try to run nedit I get an error
>root@---------# nedit
>Xlib: connection to ":0.0" refused by server
>Xlib: No protocol specified
>NEdit: Can't open display


>But, if I first run
>xhost +localhost
>and then go to root and run nedit I'm OK.


Before you "su", use

XAUTHORITY=$HOME/.Xauthority
export XAUTHORITY

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 12:18 PM
Dave Uhring
 
Posts: n/a
Default Re: How do I eliminate this error in Slack 9.1

On Thu, 17 Jun 2004 21:04:22 -0700, A-B C. wrote:

> If I su to root and try to run nedit I get an error


Don't use 'su -', just use 'su'.

Better yet, learn how to use vi or, if you have sadomasochistic
tendencies, emacs.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 12:18 PM
Dominik L. Borkowski
 
Posts: n/a
Default Re: How do I eliminate this error in Slack 9.1

Dave Uhring wrote:


> Don't use 'su -', just use 'su'.


uhmm, in most cases 'su -' results in the desired environment. besides, it
has nothing to do with this issue.

> Better yet, learn how to use vi or, if you have sadomasochistic
> tendencies, emacs.


that suggestion is just plain dumb.

anyway, follow the suggestion of exporting XAUTHORITY as another poster
mentioned, or if you're using kde and want it easy: use kdesu.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 12:56 PM
Eef Hartman
 
Posts: n/a
Default Re: How do I eliminate this error in Slack 9.1

Dominik L. Borkowski <dom@vbi.vt.edu> wrote:
> uhmm, in most cases 'su -' results in the desired environment. besides, it
> has nothing to do with this issue.


Yes it does, because it also changes the home directory, so that the
..Xauthority file isn't found anymore. That is what setting the XAUTHORITY
environment variable fixes, setting the path TO the .Xauthority file.

To be able TO connect to the Xserver, the client either needs to
supply the authority key, found IN the .Xauthority file, or the
Xserver has to allow "any client on this machine", which is what
xhost does. But after "su -" the client doesn't know where the
..Xauthority is located, as the home dir has been changed.
--
************************************************** ******************
** Eef Hartman, Delft University of Technology, dept. EWI/TW **
** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 **
** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
************************************************** ******************
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:25 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com