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 676758 - Do not reorder VPN
Do not reorder VPN
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: network-indicator
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-24 17:07 UTC by Paolo Borelli
Modified: 2013-01-03 00:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
NetworkManager: deactivate connection before activating a new one (1.14 KB, patch)
2012-06-10 15:10 UTC, Giovanni Campagna
none Details | Review

Description Paolo Borelli 2012-05-24 17:07:25 UTC
VPN listed in the menu are reorederd so that the connected one is at the top.

This however is confusing: since just one VPN can be active at each time what happens to me very often is the following

1) I am connected to "Foo"

VPN Connections:
* Foo
  Bar

2) I want to switch to "Bar" VPN, which is the second in the list.

3) I disconnect from VPN, menu becomes

VPN Connections:
  Bar
  Foo

4) I click on the second item in the menu, which was Bar when I started...

5) I am connected again to Foo :(
Comment 1 Giovanni Campagna 2012-05-24 17:13:08 UTC
This is not a VPN specific issue, actually - it happens with all connection-based devices (so effectively everything but wireless).
I'd like to hear designer input on this one - I believe it was part of the original design to highlight the current connection, and nm-applet always did it.

(Btw, the actual rearrangement is partly a bug - connections are ordered by last-recently-used time, but that is often not updated by NetworkManager)
Comment 2 Paolo Borelli 2012-05-24 17:33:29 UTC
For wired it makes sense to reorder, since each connection is independent from the other. The problem with VPN is that at the moment you can just have one active, so switching VPN is a common task and that requires interacting with two items in sequence, so this is where the reordering becomes annoying.

If we could have many VPN at once that would be solved :-)

Another way to improve the situation is to make possible to switch from a VPN to another without having to disable first.
Comment 3 Milan Bouchet-Valat 2012-05-25 07:54:52 UTC
(In reply to comment #2)
> Another way to improve the situation is to make possible to switch from a VPN
> to another without having to disable first.
This sounds the most reasonable solution. Why would you need to disconnect manually when the Shell can it it automatically? Is this really needed ATM?


Advocating the devil: the fact that VPN entries swap their positions when you click on them can also be good for automatisms. It means the currently disabled VPN is always the second (when you have two of them), so you have to click on the same place everytime instead of wondering which VPN you want to enable.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-05-25 08:01:22 UTC
(In reply to comment #3)
> Advocating the devil: the fact that VPN entries swap their positions when you
> click on them can also be good for automatisms. It means the currently disabled
> VPN is always the second (when you have two of them), so you have to click on
> the same place everytime instead of wondering which VPN you want to enable.

That's not how humans work, according to a lot of usability research.
Comment 5 Giovanni Campagna 2012-05-25 12:43:21 UTC
(In reply to comment #2)
> Another way to improve the situation is to make possible to switch from a VPN
> to another without having to disable first.

And that's not possible? I'd say this is a bug in NetworkManager, but we can work around it in gnome-shell.

Let me prepare something...
Comment 6 Giovanni Campagna 2012-06-10 15:10:16 UTC
Created attachment 216061 [details] [review]
NetworkManager: deactivate connection before activating a new one

Apparently, NetworkManager doesn't allow to activate a new VPN
over an existing one. To achieve the desired behavior of "switching"
to a new connection, deactivate the existing one.
The change is done at NMDevice level both for consistency and for
code clarity.
Comment 7 Dan Williams 2012-06-11 18:12:12 UTC
At some point here though we're going to have the DEACTIVATING state implemented, which will call pre-down scripts that might take a bit of time to complete.  So I'd rather make NM handle the deactivation, which we have to do already for devices, so we might as well do for VPN just to make things consistent.

That said, even if this patch got committed, we'd still queue up the activation request internally in NM and start it after the deactivation was completed to ensure this patch worked as expected.  So it's your call whether to commit this or not.
Comment 8 Giovanni Campagna 2012-06-12 15:29:10 UTC
If you tell me NM will be fixed before 3.6, there is no need to push this to master. Otherwise, this should go in, and then we can fix it again when the DEACTIVATING state appears.
Comment 9 Giovanni Campagna 2012-10-18 20:11:23 UTC
So, was this fixed in NM at the end?
If so, please close this. Thanks!
Comment 10 Giovanni Campagna 2013-01-03 00:55:03 UTC
This was fixed in gnome-shell when the VPN redesign landed. Closing!