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.

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

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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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".

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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,
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.
Fixed the -1 problem on this question.
Escrow points corrected.

Community Support Moderator
Experts Exchange
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.