After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677097 - Multiple wired network profiles
Multiple wired network profiles
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
3.4.x
Other Linux
: Normal major
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-30 13:36 UTC by kitingChris
Modified: 2012-05-31 19:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network applet with first profile (22.53 KB, image/png)
2012-05-30 17:55 UTC, kitingChris
  Details
network applet with second profile (28.07 KB, image/png)
2012-05-30 17:56 UTC, kitingChris
  Details
Networkmanager (without expected possibility to choose the profile) (39.35 KB, image/png)
2012-05-30 17:58 UTC, kitingChris
  Details
NetworkMenu: fix updating connection lists (8.57 KB, patch)
2012-05-31 17:15 UTC, Giovanni Campagna
committed Details | Review

Description kitingChris 2012-05-30 13:36:43 UTC
the gnome-shell network manager is not able to handle multiple network profiles. Unfortunatelly our university decided to make 802x auth mandatory instead of vpn. At home the 802x auth is not needed and shows up as a problem...
nm-connection-editor is able to set up different wired connections but the profiles dont show up in the gnome-shell.
Comment 1 Giovanni Campagna 2012-05-30 15:41:25 UTC
This is not expected, multiple connections for the same device are well supported and tested (I for example have one connection with DHCP and one for connection sharing).

You should have entries for them under "Wired" in the network menu.
Can I see a screenshot?
Comment 2 kitingChris 2012-05-30 17:55:29 UTC
Created attachment 215274 [details]
network applet with first profile
Comment 3 kitingChris 2012-05-30 17:56:13 UTC
Created attachment 215275 [details]
network applet with second profile
Comment 4 kitingChris 2012-05-30 17:58:00 UTC
Created attachment 215276 [details]
Networkmanager (without expected possibility to choose the profile)
Comment 5 kitingChris 2012-05-30 17:58:08 UTC
I got an tip not to use the networkmanager gnome-shell comes with. Instead I used nm-connection-editor. Now the connections show up in the network manager. 

But as shown in the screens there is an bug displaying the namens. For the 2 screens I switched the profiles and only the active profile is named properly.

On the other side referring the tickets origin intention I would expect the gnome network manager handle the profiles. But there is no possibility.
Whereas there is an dropdown for choosing the wifi connection there is no possibility to choose the wired profile. Its kind of confusing...
Comment 6 kitingChris 2012-05-31 06:03:25 UTC
The applet nor shows the right namens. Reboot solved this problem. 

So last point the 'missbehaviour' of the gnome internal network manager...
Comment 7 Giovanni Campagna 2012-05-31 16:39:08 UTC
Ok, so essentially there are two bugs here.
The first one is that gnome-shell doesn't react to connection updates and show wrong names until restarted. The second one is that gnome-control-center only offers "Configure..." for the currently active connection.

Since you originally filed this for gnome-shell, I'm leaving this one for the former. Please open another bug for the gnome-control-center product, network component, referencing this one.
Comment 8 Giovanni Campagna 2012-05-31 17:15:41 UTC
Created attachment 215349 [details] [review]
NetworkMenu: fix updating connection lists

Ensure that the UI is updated when a connection changes name or id,
even if it was already known by a device.
Also, use less private properties on NMConnection objects, as they
can become stale and cause problems.
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-05-31 17:26:20 UTC
Review of attachment 215349 [details] [review]:

Looks mostly fine.

::: js/ui/status/network.js
@@ +260,3 @@
             let obj = {
                 connection: connections[i],
+                name: connections[i].get_id(),

Why can't it be obj.connection.get_id()? (Or just push the connection object itself)

@@ +378,3 @@
+            this.removeConnection(connection);
+        if (valid)
+            this.addConnection(connection);

So if it exists and it's valid and there's no similar connection, you're going to add and remove it, instead of just updating it? Won't that mess with things?
Comment 10 Giovanni Campagna 2012-05-31 17:58:03 UTC
(In reply to comment #9)
> Review of attachment 215349 [details] [review]:
> 
> Looks mostly fine.
> 
> ::: js/ui/status/network.js
> @@ +260,3 @@
>              let obj = {
>                  connection: connections[i],
> +                name: connections[i].get_id(),
> 
> Why can't it be obj.connection.get_id()? (Or just push the connection object
> itself)

Because I want to compare obj.name, which is guaranteed to be equal to the label in the menu, to connection.get_id() inside checkConnection, to see if something changed.

> @@ +378,3 @@
> +            this.removeConnection(connection);
> +        if (valid)
> +            this.addConnection(connection);
> 
> So if it exists and it's valid and there's no similar connection, you're going
> to add and remove it, instead of just updating it? Won't that mess with things?

Even if I didn't call add/remove, I would still splice the _connections array and call Util.insertSorted on it, then clear the section and queue the UI update.
Calling the existing functions seemed cleaner.

(Btw, addConnection is no longer called from outside, it could just be merged into checkConnection)
Comment 11 Jasper St. Pierre (not reading bugmail) 2012-05-31 18:12:43 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > Review of attachment 215349 [details] [review] [details]:
> > 
> > Looks mostly fine.
> > 
> > ::: js/ui/status/network.js
> > @@ +260,3 @@
> >              let obj = {
> >                  connection: connections[i],
> > +                name: connections[i].get_id(),
> > 
> > Why can't it be obj.connection.get_id()? (Or just push the connection object
> > itself)
> 
> Because I want to compare obj.name, which is guaranteed to be equal to the
> label in the menu, to connection.get_id() inside checkConnection, to see if
> something changed.

NetworkManager doesn't provide a notify::id or a id-changed signal? (I guess I don't fully understand the code flow, but a lot of this seems very fancy)

> > @@ +378,3 @@
> > +            this.removeConnection(connection);
> > +        if (valid)
> > +            this.addConnection(connection);
> > 
> > So if it exists and it's valid and there's no similar connection, you're going
> > to add and remove it, instead of just updating it? Won't that mess with things?
> 
> Even if I didn't call add/remove, I would still splice the _connections array
> and call Util.insertSorted on it, then clear the section and queue the UI
> update.
> Calling the existing functions seemed cleaner.

Yeah, OK.

> (Btw, addConnection is no longer called from outside, it could just be merged
> into checkConnection)

No. The separate functions are cleaner.
Comment 12 Jasper St. Pierre (not reading bugmail) 2012-05-31 18:13:06 UTC
Review of attachment 215349 [details] [review]:

Sure, then.
Comment 13 Giovanni Campagna 2012-05-31 18:52:00 UTC
There is no notify::id because it's a convenience getter, not a
real property. Also, notify::id on the object actually holding the
property (a #NMSettingsConnection) would have no effect - the object
is just replaced inside the connection.
What we have is a single 'updated' signal, for whatever change has
happened outside.

Attachment 215349 [details] pushed as 35b142f - NetworkMenu: fix updating connection lists
Comment 14 kitingChris 2012-05-31 19:04:50 UTC
Wow you guys are real fast :) 

Ill gona test it next tuesday at university ;)

And opening an extra ticket for the other issue as adviced.
Comment 15 Jasper St. Pierre (not reading bugmail) 2012-05-31 19:15:10 UTC
(In reply to comment #13)
> There is no notify::id because it's a convenience getter, not a
> real property. Also, notify::id on the object actually holding the
> property (a #NMSettingsConnection) would have no effect - the object
> is just replaced inside the connection.
> What we have is a single 'updated' signal, for whatever change has
> happened outside.

OK, so it just sounds like NetworkManager has a bad API. Has there been any thought towards fixing this?