Ask Your Question
2

automatic captive portal login?

asked 2016-10-14 06:07:49 -0500

mightyflea gravatar image

Hi all.

Since a couple of releases, Gnome shell on Fedora has captive portal detection; this actually works quite well and one can enter one's credentials to log into the network.

It gets tedious to enter the same login every time you wake the laptop back up from sleep and your previous login has expired.

Is there a way to automate this? That is, some way to store the login information and to automatically enter it when a captive portal has been detected? (I know I can use the browser's password storage for this and just ignore the builtin gnome portal detection, but that is a bit cumbersome too.)

So; has anybody managed to achieve that?

(I am on Fedora 24 by the way.)

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2018-03-26 03:49:22 -0500

Petr Menšík gravatar image

updated 2018-03-26 03:53:33 -0500

I were able to use side feature of dnssec-trigger, which has also hotspot detection on its own. I were not able to find any place to override default started web browser from gnome.

dnf install dnssec-trigger

Now edit /etc/dnssec-trigger/dnssec-trigger.conf

uncomment login-location. And write your own script Mine is looks like this:

#!/bin/sh
DEVICE=wlp4s0
CONNECTION=$(nmcli -g GENERAL.CONNECTION device show $DEVICE)
DIRECTORY=/etc/dnssec-trigger/hotspots
HOTSPOT="$DIRECTORY/$CONNECTION"

if [ -n "$CONNECTION" -a -x "$HOTSPOT" ]; then
        $HOTSPOT
        [ -z "$@" ] || xdg-open $@
fi

and use it for login-command.

Then you can create script in hotspots subdirectory that will log you in. I named that script after wifi network, so it would be used only on such network. Smarter detection useable also for ethernet would be better. I used it only for conferences where the password were not valuable. So simple wget would do with right parameters.

wget --no-hsts --post-data="$DATA" $LOG -S "$URL"

I would expect far easier way to solve this problem, as hotspots are common at conferences. I do not know any better way. Think new bugzilla with feature request should be made instead. It annoys me that gnome opens web page, but without support for any password storage. I have to always retype password that is the same for everyone.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-10-14 06:07:49 -0500

Seen: 637 times

Last updated: Mar 26 '18