6

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.

6

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.

11

For disabling it, in Ubuntu it is (no idea if it applies to Fedora):

Open Settings
Select Privacy
Turn ‘network connectivity checking’ off

The offending file in Fedora is however /usr/libexec/gnome-shell-portal-helper ; you may replace it with a bash script that does nothing; after that you can login once and save the login credentials in Firefox or a Firefox add-on.

Cisco Meraki does indeed support the WISPr protocol and it could be an interesting venue to pursue for automating the login process via a script or program.

5
  • Would this interfere with dnf at all? – HSchmale Jan 25 '18 at 15:45
  • @HSchmale I know how to tell Debian package manager not to touch modified files when upgrading; no idea how to do that in Fedora TBH; how about opening another question for that? – Rui F Ribeiro Jan 25 '18 at 15:51
  • This will indeed by overwritten on package update. See my answer for a better approach. – mattdm Feb 14 '18 at 21:25
  • 1
    Thanks, I had this page randomly popping out on my screen for some days. – toto Oct 18 '18 at 13:44
  • For people visiting this, how to this in OS/X for development purposes unix.stackexchange.com/questions/385827/disabling-cna-in-macos – Rui F Ribeiro Jun 28 '19 at 16:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.