Friday, September 29, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  9] [ 0]  / answers: 1 / hits: 7610  / 2 Years ago, mon, may 10, 2021, 6:48:00

I just installed Ubuntu 18.04 and going through all my dotfile-scripts to properly configure Ubuntu automatically as much as possible. Looping through gsettings I was able to configure most settings as I want them but I haven't found anything in gsettings related to "Connectivity Checking" which is new in Ubuntu 18.04 LTS (at least not included in 16.04 LTS).

I can turn off Connectivity Checking through Settings -> Privacy but how can I do this programmatically? Just uninstall network-manager-config-connectivity-ubuntu? I was able to turn off other privacy settings through gsettings.

Viewing the file list of this package at indicates that there is just one settings file (/usr/lib/NetworkManager/conf.d/20-connectivity-ubuntu.conf) but it does not show any possibility to enable/disable the feature.

Any help is appreciated.

More From » 18.04


UPDATE 2022: Please note that - even though this answer was accepted - the internal conf file shouldn't be edited manually according the the comment by thaller. The mentioned solution is:
Adding a config file to the /etc/NetworkManager/conf.d directory - Documentation:

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.

Alternatively using D-Bus: busctl --system set-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager ConnectivityCheckEnabled "b" 0

(Haven't tested those options myself)

Original Answer:
There is a flag in the file /var/lib/NetworkManager/NetworkManager-intern.conf that is set to false if you disable the setting in the UI:


You can use the tool crudini to set the flag using the command line or a script:

sudo crudini --set /var/lib/NetworkManager/NetworkManager-intern.conf "connectivity" ".set.enabled" "false"

For some reason the ui doesn't get updated until a reboot (didn't test logoff/login).
Maybe there is some other command line tool that does the change and ensures that the UI gets updated as well.

btw: I used the following command to get the files that changed recently (only checked /var and ~ so far):

sudo find /var -newermt "-1 minute" -ls

There aren't any changes to gsettings. I monitored the settings using this command:

dconf watch /

[#8536] Tuesday, May 11, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 106
Total Questions: 148
Total Answers: 129

Location: Monaco
Member since Sun, Jan 1, 2023
10 Months ago