Friday, January 23, 2009

Firefox always starting in offline mode?

I got a new laptop a little over a month ago and ever since the first day I've had an annoying little problem with Firefox. Whenever it started, it was stuck in "work offline" mode. I checked the user prefs in my .mozilla folder, and they said that I should be fine. (There is a setting for starting the browser offline, but it was set to false.)

As with many minor annoyances that don't actually stop me from getting work done, I mostly left the problem alone and just looked it up on Google every so often to see if I could find a solution. Mostly, I only found other Linux users complaining of the problem, but no one who had actually fixed it. Today I saw a fix that seemed unlikely, but I tried it anyway.

sudo apt-get remove network-manager

I didn't really need Network Manager anyway, since it wasn't recognizing my wireless card and I have to use iwconfig on the command line to bring my wireless connection up. And, whaddya know? It works!

From what I've been able to gather, Firefox asks your computer if you are logged into the network, rather than actually trying to connect to a server and then giving up when it doesn't work. Since the network configuration tool that Firefox was talking to didn't know what was really going on with my network connectivity, it gave false information and Firefox "saved me from a 404" by setting the mode to "work offline". How annoying.

This is one of those places where I have to point out to those who want everything to be automatic that we just aren't there yet. There has to be a way for the human to step in and say, "Wo! You got it wrong!" and what the human says should trump what other computer programs are telling you. In Firefox, that could translate into a setting something like "Ignore network manager connection awareness".

If you are a Linux user with this problem and don't want to manage your network through the Linux command line tools like ifconfig, iwconfig and dhclient, I'm afraid I'm not sure what to tell you. There may be another gui network tool you can use, but I am not familiar with any. So, either you'll have to keep un-checking the "work offline" box when you load Firefox, or else you should start reading man ifconfig, man iwlist, man iwconfig and man dhclient.

Sorry I'm not more helpful today.


Anonymous said...

Yay! It worked! Thank you so much. This problem has been plaguing me forever.

SanJ Wijeratne said...

I had the same issue and after googling it, I found you can fix this by setting "toolkit.networkmanager.disable" property of Firefox to "true". Type about:config in the address bar and copy and paste toolkit.networkmanager.disable there and set its value to true by double clicking on it. I even blogged it. Hope this will help you :)

Lisha said...

Great tip, SanJ. Thanks!

Sheffield said...

I had this problem just this morning, and found an easier way to fix it. When it keeps saying you are in 'offline mode' and then it won't work when you uncheck the box under 'file', try this. Close all firefox windows, go to taskmanager and you will see that firefox.exe is still running. Close it manuall and re-start the browser. Problem will be gone... I realised you fixed it but this may help other users finding this page :-)

Isaac G said...

Thank you so much for this post, and Sanj Wijeratne for your comment. Worked a charm! :)