Bug 366708 - Set default network priority not to zero
Summary: Set default network priority not to zero
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networking in general (show other bugs)
Version: master
Platform: Other Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Lukáš Tinkl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-12 17:36 UTC by Simone Gaiarin
Modified: 2024-12-23 18:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.7.5
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Gaiarin 2016-08-12 17:36:08 UTC
With the current implementation of plasma-nm it's possible to set different priorities to different networks, it would be useful to have the default priority set to a value different to zero (something like 50), so that it's possible to create a new connection with lower priority than all the other networks.

Use case:
I create a share network connection and I want to automatically connect to it when I'm at work. Since it's a shared wireless network connection, this will be available everywhere. Of course I don't want to automatically connect to it in every place. To avoid this I need to raise the priority of every new network I'll connect to.

Solution:
If the default priority for every new network is 50, I can create the shared network connection and set a priority of 40, so that I'll automatically connect to it only when I'm at work without changing the priority of all the other networks.

Reproducible: Always
Comment 1 Lamarque V. Souza 2016-09-05 14:09:23 UTC
Hi Simone. Well, this goes against NetworkManager's specification [1]. I would rather prefer you open a bug report in http://bugs.gnome.org (component NetworkManager) so it can be changed in the specification and for all other NM's clients. Plasma NM is a NM client, like nm-applet, nmcli, etc. We need to change this for all clients to make this change consistent across all of them.

[1] https://developer.gnome.org/NetworkManager/stable/ref-settings.html
Comment 2 Simone Gaiarin 2016-09-06 07:57:56 UTC
Hi Lamarque,
your answer made me read the NM specifications and I've found that the value autoconnect-priority is int32 which  can possibly be negative (other parameters require specifically uint32).

Executing the command:
nmcli connection modify MYCONNECTION connection.autoconnect-priority -10

doesn't rise any error and running

nmcli connection show MYCONNECTION 

shows that the value has been set.

I cannot test if this priority works in this moment, but if it's the case it would be enough to let the priority value be negative in the UI spinbox and the problem would be solved.
Comment 3 Lamarque V. Souza 2016-09-06 08:37:05 UTC
Git commit 634dd971a997d8d2f7cf0ead3c80f8cd47091aab by Lamarque V. Souza.
Committed on 06/09/2016 at 08:36.
Pushed by lvsouza into branch 'master'.

Allow negative priorities since NetworkManager's specification allows that [1]

[1] https://developer.gnome.org/NetworkManager/stable/ref-settings.html
FIXED-IN: 5.7.5

M  +8    -0    libs/editor/settings/ui/connectionwidget.ui

http://commits.kde.org/plasma-nm/634dd971a997d8d2f7cf0ead3c80f8cd47091aab
Comment 4 Lamarque V. Souza 2016-09-06 08:37:34 UTC
Git commit 65391985791da862adf2f6f678a540b3963db3db by Lamarque V. Souza.
Committed on 06/09/2016 at 08:37.
Pushed by lvsouza into branch 'Plasma/5.7'.

Allow negative priorities since NetworkManager's specification allows that [1]

[1] https://developer.gnome.org/NetworkManager/stable/ref-settings.html
FIXED-IN: 5.7.5

M  +8    -0    libs/editor/settings/ui/connectionwidget.ui

http://commits.kde.org/plasma-nm/65391985791da862adf2f6f678a540b3963db3db
Comment 5 Simone Gaiarin 2016-09-06 11:09:38 UTC
Great! Thanks
Comment 6 Lamarque V. Souza 2016-09-06 12:07:23 UTC
(In reply to Simone Gaiarin from comment #5)
> Great! Thanks

You're welcome and thanks for spotting this issue.
Comment 7 Ben Cooksley 2024-12-23 18:23:48 UTC
Bulk transfer as requested in T17796