Ubuntu – Elementary OS website spontaneously opens up in Chrome throughout the day. I have no idea why or how to stop it. Any solutions

chromebookelementarygoogle-chromepantheonuninstall

I am using Ubuntu 14.04 on my chromebook. However I'm 100% sure the chromebook has nothing to do with it as the problem just started up a couple days ago some time after visiting elementary.io .

I have not installed Elementary on this laptop ever. However I did try to install their Pantheon DE to no avail earlier this week. I thought I properly removed the DE using:

sudo apt-get remove --purge elementary-desktop

Then did:

sudo add-apt-repository --remove ppa:elementary-os/testing

sudo add-apt-repository --remove ppa:elementary-os/daily

sudo apt-get autoremove

However the website launches in google chrome when I first login into the desktop. Then it will spontaneously launch periodically as I'm using my laptop throughout the day. I have Firefox installed on the laptop as well and this never happens with Firefox. Google is also set to my homepage in chrome. So I know Elementary website didn't get mistakenly set as my homepage

Does anyone have any solutions as to what to do about this?

Best Answer

Cause of the problem

When you have installed the elementary Pantheon desktop environment you have installed the elementary captive portal assistant too, which helps you to connect to different public WiFi networks. Its job is to open the portal website so that you can log in to the network. Actually it opens the https://elementary.io website. (It is the network's job to redirect you to their sign in portal.)

This logic is contained in this script /etc/NetworkManager/dispatcher.d/90captive_portal_test, which is being executed by the network assistant.


Solution

sudo chmod -x /etc/NetworkManager/dispatcher.d/90captive_portal_test

This will prevent the network assistant to execute the script.


Behind the scenes

This is the piece of the code, which causes the annoying popups:

#launch the browser, but on boot we need to wait that nm-applet starts
start_browser() {
    local user="$1"
    wait_for_process nm-applet
    $logger "Running browser as '$user' to login in captive portal"
    su "$user" -s /bin/sh -c "captive-login 2>/dev/null || sensible-browser start.elementaryos.org 2>/dev/null"
}

References:

  1. elementary OS Launchpad bug report
  2. Answer on elementary OS's stack exchange
  3. Disabling captive portal detection on elementary OS Freya