2

I upgraded Xubuntu to 14.04 a few months ago and ignored that problem for a while, but it's getting ridiculous.

My NetworkManager connects to some random (configured) network, instead of the last active one, like it used to be. So when I plug in the Ethernet cable it connects to one of the 10 fixed IP configurations I have instead of DHCP like it did last time. When I come home it often doesn't automatically connect to my home WiFi, but to some WiFi with the same name like one I configured years ago and haven't really used in ages.

How can I fix this to get the old behaviour back?

Edit: This is my expected behaviour and how I remember before the update:

  • "MyHomeNetwork" is the one I last connected to 1 day ago
  • "dlink" I connected to last 5 months ago and might do so again in the future
  • I can see a "dlink" network in my neighbourhood besides the "MyHomeNetwork"
  • I want NetworkManager to connect to "MyHomeNetwork" because it was the most recently active one

2 Answers2

2

Having several wireless SSIDs with the same name is fairly common in University dorms and other living arrangements where wifi is provided as part of the rent or lease. The first step I suggest is to check here from the terminal:

ls /etc/NetworkManager/system-connections/

You will see connection information for many previous networks; for example:

GBR1 USRP CMC-guest MAHB motel-guest

You may remove any that you are certain you will not be using in the future:

sudo rm -rf /etc/NetworkManager/system-connections/MAHB

Next, if you have two wireless access points with the same name, I suggest you bind to the preferred network as in this answer: Ubuntu connect drops. Worked for a while then started dropping again

For the connections that you want to remember but not connect to:

sudo nano /etc/NetworkManager/system-connections/NameOfNetwork

and set autoconnect=true to autoconnect=false

chili555
  • 61,330
1

First of all, open "Edit Network Connections" dialogue or call it through terminal with nm-connection-editor. Then open the dlink connection, and under General, uncheck " Automatically connect to this network "

What else you could do is edit the /etc/NetworkManager/NetworkManager.conf file, by adding no-auto-default=* , which should prevent Network Manager creating a default wired connection.

Also, don't forget that changes take effect upon restarting network manager with sudo service network-manager restart