Ask / Submit

Don't open browser on wifi connection

asked 2018-01-22 19:54:14 +0200

roland684 gravatar image

updated 2018-01-23 10:30:35 +0200

jiit gravatar image

Every time my Jolla 1 comes across an open wifi network, it connects to it (I like this, I think I might have made it do it, don't remember)

Sometimes these networks are open, sometime they have a login/terms page before you can access the open internet. Sailfish detects these pages by requesting as soon as it connects to a wifi network. If that request does not result in the expected response from, it's probably a login page and the default browser is opened to show that page. Which is annoying, a security risk, a privacy issue, etc.

When I drive across town, my apps check mail/IM/traffic (over a secure connection) whenever they can, but the OS also opens loads of browser tabs every time it encounters a login page, interrupting whatever I was doing. And every time I lose wifi signal at home, the guest login page of my neighbors network is opened.

Is there way to disable the check for Or at the very least to stop it from constantly opening the browser? I don't even use the default browser, so maybe disabling that browse would be an option for me (although not very nice).

edit retag flag offensive close delete

4 Answers

Sort by » oldest newest most voted

answered 2018-01-22 23:40:11 +0200

phklrz gravatar image

Hello if you've enabled developper mode, edit /etc/connman/main.conf and comment the line

Ipv4StatusUrl =

edit flag offensive delete publish link more


This did not work. I still get my neighbors guest login page at random moments. It only changed that the browser now isn't opened at, but at my default homepage. I even rebooted my phone.

roland684 ( 2018-01-23 15:01:21 +0200 )edit

Indeed, after checking comman sources, it connects to by default.

Do not comment the line but delete 'http://ipv4...'

i.e let:

Ipv4StatusUrl =

phklrz ( 2018-01-23 16:36:21 +0200 )edit

Finally it's not a good idea. Some applications are no longer aware that the network is up.

phklrz ( 2018-01-23 23:29:55 +0200 )edit

OK, it does work to prevent the browser popping up. Whether it's a good idea or not remains to be seen.

I don't know if it's related or a coincidence, but while I had the line commented out, I wasn't able to change the screen brightness in the quick menu anu more. The slider was locked to the left. I could still do it via the settings app.

roland684 ( 2018-01-24 12:32:07 +0200 )edit

@roland684 :

You could use a variant of the "logon script" I proposed underneath, but without the portal logon handling.

Just something that either forwards the content of the StatusUrl, or replies with an error (instead of the actual logon portal) if it can't access it.

DrYak ( 2018-01-24 13:03:06 +0200 )edit

answered 2018-01-22 21:39:35 +0200

Stedephys gravatar image

uninstalling the browser should be qite easy. just run

pkcon remove sailfish-browser

as root. though you may want to keep an rpm of the browser on your phone to have the option to re install it when your browser doesn't work. In the case you want to do something more subtile you could edit


and link to an empty html file on your device.

edit flag offensive delete publish link more


It's a very crude solution, but thank you for the howto.

I don't think you can use the hosts file to direct a hostname to a file.

roland684 ( 2018-01-24 12:39:05 +0200 )edit

answered 2018-01-24 11:27:12 +0200

DrYak gravatar image

Another completely different way to handle the problem would be a series of "Situations" script that turn your Wifi connection on/off whenever you leave the house / return to it.


  • Whenever your home Wifi base station SSID isn't seen anymore, turn Wifi Off
  • Whenever your car Bluetooth Macaddress isn't seen anymore, turn Wifi back On
  • Or, whenever the cell tower near your workplace is seen again, turn Wifi back On


This way, while roaming the city, the phone stays on reliable 3G/4G connection and while at home or at work, it uses the Wifi.

See here for newer versions of Sailfish OS where turning Wifi and Bt On/Off is a priviledged action.

edit flag offensive delete publish link more


I don't have a data plan :) I find it too expensive (€150 a year while wifi is available almost everywhere?) and don't mind (and even enjoy) being offline once in a while. But it would be nice if it goes online whenever it can, without the browser popping up side effect.

roland684 ( 2018-01-24 12:47:32 +0200 )edit

@roland684 > Without the browser popping up side effect :

You might consider looking for solution to automatically logon captive portals for Linux. (i.e.: the script handles the portal)

bonus point: chain it with the normal portal detection - have the script contain a small embed micro webserver, point the portal detection to that URL. If the logon script succeeds, it returns forwards the original content of If the logon script fails, it returns a resource not available error instead of the actual portal redirect, so Sailfish considers it as a private local network with no internet connectivity and doesn't complain nor opens a webpage.

DrYak ( 2018-01-24 13:01:08 +0200 )edit

answered 2018-01-24 11:32:47 +0200

DrYak gravatar image

Yet different solution to the problem :

Sailfish OS only attempts to automatically connect to known Wifi access points.

(e.g.: If you connect once to a cyber cafe's Wifi Network - passwordless but with a login portal - whenever the phone sees the same Wifi access point name - because your car drove past one cafe of this chain which uses the same name - it will try to connect it again and notice again that there's a login portal)

Go into the WLAN Setting and purge off (long press, forget) any Wifi Network that you don't need to connect to. (Or at least disable them with the toggle).

edit flag offensive delete publish link more


I guess I changed that (long ago, I don't remember how, I thought it was a regular setting, but I can't find it any more).

My phone connects to any wifi, even unknown ones. And I do like that. It would be fun to have a option not to forget a network, but to block it, but that's outside the scope here.

roland684 ( 2018-01-24 12:36:54 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2018-01-22 19:54:14 +0200

Seen: 749 times

Last updated: Jan 24 '18