Cannot connect to X

Tony Hammitt thammitt at kc.rr.com
Mon Jun 26 00:16:07 CDT 2000


I haven't had this problem with Linux, but I used to with OSF/1.  The
thing I did to make it work better is put a line like
'sleep 10; xhost + localhost' in an external startup script file that
gets called from ~/.xinitrc.  Most of the things in this file get
started in the background (like an xterm, etc.) and having the other
parts of the script running after a delay gives them time to have a
fully functional X server to talk to.  X may be ignoring/flushing
your request if it gets it too early, waiting 10 seconds to run
the xhost command probably can't hurt.

Then again, I may be wrong and you have to manually run the command
from the prompt every time.  I don't think so, but I'm not going to
plug around in the X source looking for a definitave answer... =-]

Regards,

Tony Hammitt

Randy Rathbun wrote:
> 
> Okay, here is the deal - I log in as me, su to root to do something, need
> to fire up some X app, and am greeted with a message saying I can not
> connect to the X server. So, I back out, do xhost + localhost, and then I
> can su to root and go on my happy way.
> 
> Now, how do I make this stick? I have a line in ~/.xinitrc I think it is
> called that says xhost + localhost, but it is not doing that when I log
> on. Am I putting the line in the wrong place?
> 
> Randy Rathbun
> randy at rrr.2y.net
> http://rrr.2y.net/
> 
> If Bill Gates had a nickle for every time Windows crashed...
> Oh, wait, he does!
>                          - from a slashdot.org post
> 




More information about the Kclug mailing list