Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Gnome, NetworkManager, and FireFox/IceWeasel 3 starting in Offline mode (also: Pidgin Waiting for network connection)

    19th July 2008

    For some reason, my IW 3 is now starting in Offline mode each time, despite my attempts to remove that checkbox every time. Also, Pidgin says “Waiting for network connection” in the status drop-down.

    Update: as suggested by Donny Kurnia (based on the recent post by Hobgoblin), the simplest and the most correct way to fix the problem for FireFox/IceWeasel is to go to about:config and set toolkit.networkmanager.disable to true.

    The simplest workaround for Pidgin is to open Accounts -> Manage, then remove and then set again the checkbox near the account you wish to get connected. This has to be done every time you start pidgin :( .

    Below you will find other (worse and obsolete – for FireFox/IceWeasel, but good for Pidgin) solutions.

    Little research had shown that the simplest solution is to disable FireFox’s/IceWeasel’s feature to auto-detect if Internet connection is available: go to about:config, find browser.offline-apps.notify and set it to false. After this, FireFox/IceWeasel 3 will no longer try to check if you have Internet connection. (this was wrong, and here is why: kb.mozillazine.org/Browser.offline-apps.notify)

    However, this is not a good solution, because auto-detection generally improves user experience (e.g. by automatically using cached page versions for tabs open at startup). The actual reason (in many cases) is the network detection by the NetworkManager – it reports “no connection” although connection is present (bug report).

    The simple solution (and, possibly, the best solution for Pidgin) is to disable (or even remove) NetworkManager. On Debian, this can easily be done by following these steps:

    1. sudo aptitude install sysv-rc-conf
    2. sudo sysv-rc-conf
    3. find the service named network-manager, highlight it in the 2nd column (for runlevel 2); press – (minus) to stop the service, then press space to uncheck it (thus disabling automatic start), then press q to quit sysv-rc-conf

    This should have an immediate effect, but Pidgin restart might still be required.

    Another simple solution (without disabling/removing NetworkManager) is to disallow NetworkManager to notify other desktop applications about the presence of the internet connection (slightly edited; note: might be no longer a good option for Debian Squeeze, but should still work for Lenny):

    Open the terminal/konsole (Applications–>Accessories—>Terminal), and type gksudo gedit /etc/dbus-1/system.d/NetworkManager.conf (note: path might differ for your Linux distribution – try locate NetworkManager.conf). Then replace all lines

    < allow send_interface="org.freedesktop.NetworkManager"/ >
    with
    < deny send_interface="org.freedesktop.NetworkManager"/ >

    Save the changes and either reboot or just stop/kill/restart the running instance of NetworkManager. This change will stop NetworkManager from notifying FireFox/IceWeasel and other desktop applications about the presence/absence of internet connection – and FireFox will no longer start in Offline mode.

    (Thanks Nikitas350 from Ubuntu forums for this fix.)

    The even better solution would be to make NetworkManager detect the availability of connection properly. However, I did not dig deep enough to find how to do that – comments and better solutions are welcome.

    One of the more complicated solutions (and still not a perfect one) was also found at Ubuntu forums (slightly edited for contextual clarity):

    I am using USB modem to connect to internet and the Offline mode issue was also bothering me after upgrading to Firefox 3.

    The solution I have found was: disable Network Applet from System -> Preferences -> Sessions, and add the following lines to the file “/etc/network/interfaces”:


    auto eth0
    iface eth0 inet dhcp

    Thus, I guess, Firefox believes that eth0 (i.e. ethernet card) is active, although Internet connection is established via ppp0 (i.e. USB modem).

    Share

    19 Responses to “Gnome, NetworkManager, and FireFox/IceWeasel 3 starting in Offline mode (also: Pidgin Waiting for network connection)”

    1. Rick James Says:

      – comment text removed –

    2. Bogdan Says:

      Rick,

      I had to remove the text of your comment, as it is offensive, and shows your inability to read all the text.

      The simplest suggested solution was to disable this feature in FF3, other options are presented for convenience. The feature itself is normal, it’s just that not all software works good together from the start. If you don’t like it – don’t use, you still have the choice.

      And please avoid using offensive words.

    3. FireFox 3 Offline Mode Says:

      [...] I read that you can fix it by setting browser.offline-apps.notify to false [...]

    4. eggyknap Says:

      http://kb.mozillazine.org/Browser.offline-apps.notify describes the use of the browser.offline-apps.notify setting. It has nothing to do with NetworkManager and detecting offline status. Which probably explains why adjusting it did nothing to fix the offline mode startup I had :)

    5. Bogdan Says:

      Eggyknap, you are right – I didn’t bother checking the “forum knowledge” for exactness. This is now corrected.

      Did you find some elegant/simple solution to the problem?

    6. Ronaldo Richieri » links for 2008-10-20 Says:

      [...] Gnome, NetworkManager, and FireFox/IceWeasel 3 starting in Offline mode » Autarchy of the Private C… Force firefox 3 to be online (tags: offline firefox) [...]

    7. Donny Kurnia Says:

      Stop NetworkManager notifying all application is too overkill. The much appropiate way is to set toolkit.networkmanager.disable option to true. See http://kb.mozillazine.org/Toolkit.networkmanager.disable for the option’s explaination. I know this option from http://ubuntuforums.org/showthread.php?t=800179&page=4, post number 34.

    8. Bogdan Says:

      Donny,

      thanks, I’ve just updated the post.

    9. User links about iceweasel on iLinkShare Says:

      [...] Gnome, NetworkManager, and FireFox/IceWeasel 3 starting in Offline [...]

    10. David Says:

      Thank you very much for the /etc/dbus-1/system.d/NetworkManager.conf solution – the problem with the others is that they don’t also fix Pidgin (and any other potential apps) when I’m on dial-up/PAN/etc., while still letting me use NetworkManager for wifi connections.

    11. Bogdan Says:

      David,

      I’m glad it helped.

    12. blackbelt_jones Says:

      SHAZZAM! Searched all over for the answer to this little conundrum ever since I started using Firefox directly from the websiteinstead of with my distro. I find it easier to set up flashplayer, regardless of the distro. I wanted to write it up as a tip/turotrial, but I couldn’t do it without solving this annoying little problem. Thanksthanks!

    13. Recent Links Tagged With "iceweasel" - JabberTags Says:

      [...] Gnome, NetworkManager, and FireFox/IceWeasel 3 starting in Offline … Saved by tstiles on Fri 08-5-2009 [...]

    14. Mark F Says:

      I’d love to find a solution for Windows. So far, the “obsolete” solution is the only one that works, since there’s no Network Manager in Windows. I suppose I should just switch to Linux, but I don’t feel like it.

    15. Bogdan Says:

      have you tried going to about:config and setting toolkit.networkmanager.disable to true?

    16. melanie Says:

      Great! That was so annoying! I actually want to permanently disable the ability to go into offline mode at all, so this is a step in the right direction. Offline mode is about as useful to me as a bicycle is to a fish!
      Thanks!

    17. A proposito di Onda MT503HSA e Linux | NIBBLE Says:

      [...] è però accaduto solo a me: c’è chi suggerisce di impostare la chiave toolkit.networkmanager.disable a true nella configurazione di Firefox [...]

    18. NIBBLE » Blog Archive » A proposito di Onda MT503HSA e Linux Says:

      [...] è però accaduto solo a me: c’è chi suggerisce di impostare la chiave toolkit.networkmanager.disable a true nella configurazione di Firefox [...]

    19. A proposito di Onda MT503HSA e Linux | NIBBLE Says:

      [...] proprio necessario a un utente come il mio amico.Non è però accaduto solo a me: c’è chi suggerisce di impostare la chiave toolkit.networkmanager.disable a true nella configurazione di Firefox [...]

    Leave a Reply

    XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>