Linux – WIFI – Disable Hotspot Login Screen

fedoragnome3linuxwifi

I'm running Fedora 27, and my university uses a network authenication portal so GNOME pops up a hotspot login screen. I would like to disable this screen, and just have it open it in firefox, because my login data is already there. How do I change this setting? I've checked the settings app and there are no settings to change it.

Unless there is a better way to get past the captive portal. I saw mention of the WHISPr protocol. The captive portal my university uses is Cisco Meraki.

Best Answer

From the man page:

CONNECTIVITY SECTION
       This section controls NetworkManager's optional connectivity checking
       functionality. This allows NetworkManager to detect whether or not the
       system can actually access the internet or whether it is behind a
       captive portal.

       uri
           The URI of a web page to periodically request when connectivity is
           being checked. This page should return the header
           "X-NetworkManager-Status" with a value of "online". Alternatively,
           it's body content should be set to "NetworkManager is online". The
           body content check can be controlled by the response option. If
           this option is blank or missing, connectivity checking is disabled.

By default on Fedora, the package NetworkManager-config-connectivity-fedora puts that configuration into /usr/lib/NetworkManager/conf.d/20-connectivity-fedora.conf. You can simply remove that package (although this won't guarantee that it won't come back). If you just edit that file, you may find that it reappears on upgrade. So, again from the man page:

If a default NetworkManager.conf is provided by your distribution's packages, you should not modify it, since your changes may get overwritten by package updates. Instead, you can add additional .conf files to the /etc/NetworkManager/conf.d directory. These will be read in order, with later files overriding earlier ones. Packages might install further configuration snippets to /usr/lib/NetworkManager/conf.d. This directory is parsed first, even before NetworkManager.conf. Scripts can also put per-boot configuration into /run/NetworkManager/conf.d. This directory is parsed second, also before NetworkManager.conf. The loading of a file /run/NetworkManager/conf.d/name.conf can be prevented by adding a file /etc/NetworkManager/conf.d/name.conf. Likewise, a file /usr/lib/NetworkManager/conf.d/name.conf can be shadowed by putting a file of the same name to either /etc/NetworkManager/conf.d or /run/NetworkManager/conf.d.

So, what you need to do here is to simply

sudo touch /etc/NetworkManager/conf.d/20-connectivity-fedora.conf

which will create a blank file under the /etc directory, overriding the default from /usr/lib. This is a common pattern in many modern Linux applications — defaults shipped with packages go under /usr/lib, and those can be overridden in /etc.

Related Question