• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

Processes not starting when connected to the Internet

I can log-on to the internet and get a good connection.  In fact I now use my Linux box as a gateway for a home network of 5 Win9* computers, and it works really well.  But as soon as I get connected, I cannot run any process - the HD rumbles a bit and then nothing.  So, e.g., if I wish to use Netscape I have to start Netscape first, and then log-on, and then Netscape works OK.  I have to do this with any process I wish to use (FTP, Telnet etc.) before I connect to the internet.  Here is what happens if I try and run 'kfirewall' and 'Netscape' respectively via a konsole (I am in KDE, as root) while on-line, and the message(s) it returns.  Remember, when off-line, everything works as normal.

[kfirewall]
Xlib: Connection to ":0.0" refused by Server
Xlib: Client is not authorized to connect to Server
kfirewall: cannot connect to X server :0

[netscape]
Xlib: Connection to ":0.0" refused by Server
Xlib: Client is not authorized to connect to Server
Error: Can't open display: :0

Thanks,
Nick
0
Nick
Asked:
Nick
  • 2
1 Solution
 
jlevieCommented:
What's happening is that the local host name and/or IP changes when you connect,  you're using a cable modem or DSL that does DHCP... right? Consequently, once yo go on-line you loose permission to asscess the X server.

The simplest way to fix this is (make sure there's a localhost entry in /etc/hosts) to permit "localhost" to access the X server (xhost +localhost) and set your DISPLAY env to be "DISPLAY=localhost:0".
0
 
NickAuthor Commented:
Thankyou!!  Took me a bit to get my head around what you was saying, but yep it ALL works now!!  I was a bit concerned because I had to enter the Linux machines IP and name in it OWN hosts file to get (smd) nmd working, as the machine could not resolve it's own name(?), and as (which you quite rightly deduced) I have a DHCP dial-up, I then was wondering if I had gotten into an IP can of worms (you know, stick it here to see if it works, else try sticking it there etc.)- still...

I just typed xhost +localhost in a console session (not sure if this was the correct place?), and it reported the accessibilty files were updated... I presume that this is now set for good - or do I have to do it everytime after a reboot?

Thanks again,
Nick
0
 
jlevieCommented:
Using the xhost command you'd have to do it at each login. You can create /etc/X0.hosts containing "localhost" on a line by itself and the X server will automatically apply it in the manner of "xhost +localhost" each time the server starts.
0
 
kodiakbearCommented:
Fixed the -1 problem on this question.
Escrow points corrected.

kb
Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now