No matter what was the state during the last session. I want Wifi and Ethernet to be disabled to actively connect to the outside every time. I want to prevent every auto connect to a network.
Solutions should work with GNOME desktop and/or Pantheon desktop
Using Ubuntu 18.04
You coud add a @reboot
cron
task to run a script that will set all the interfaces down:add this line:
@reboot /path/to/script
The script:
Unticking a "connect automatically" will add "autoconnect=false" under the "[connection]" block of the said connection in
/etc/NetworkManager/system-connections
. One thing is therefore just running a little script to add this line to all known connections if it is not there, yet:Notably you want it to run before a network connection occurs and also after waking from suspending/hibernating. A systemd-service
disable-autoconnect.service
will do: