Okay, I’ve to get this off my chest. The way GNOME’s NetworkManager determines whether it’s connected to the internet is so fucking dumb. Now that several apps rely on the online/offline status from NetworkManager, this causes all kinds of really annoying problems that often occur at the most inconvenient times.
Right now, NetworkManager just determines whether it has made a physical connection, and if it has, it thinks it’s on the internet, and if it hasn’t it assumes there’s no connection available.
So, there are to problems with this:
* Offline-but-not-really – When I’m in the car, I have two options for connecting to my phone for internet access. I can either turn my phone into a WiFi Ad-Hoc node, and use it as a gateway for my laptop. Or, I can use Bluetooth to create a PAN and do basically the same thing. Either way, I have to set up the connection from the command line on my laptop with one or two commands. Of course, when I do this, NetworkManager has no knowledge of the connection and all of my GNOME apps that rely on it think there is no internet connection. This gets really, really old.
* Online-but-not-really – So the second problem is captive portals. For example, I’m typing this from a Panera Bread. I turned on my laptop, NetworkManager saw the open WiFi connection, and it automatically connected. Great, except NetworkManager now thinks it has a working internet connection… but it doesn’t, because I have to pop open a browser window and hit “Agree” before I actually have internet access.
The solution to this is so fucking easy… just ping! Each second, or every three or five seconds, NetworkManager should just try to ping a host like google.com… if you get a response, you’re online. This way, it doesn’t matter how you’re connected, or whether or not there’s a captive portal in the way… Why is this so hard?