Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: How do you make network connections persistent when using NetworkManager

  1. #1

    Default How do you make network connections persistent when using NetworkManager

    I had a google of this but can't find anything useful. I use networkmanager to configure my wireless card. Currently this only works when I'm logged in to KDE. If I log out the system loses the network connection. Is there a way to make it persistent using NetworkManager?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: How do you make network connections persistent when using NetworkManager

    I do not think so. Network manager is specialy designed to let the end-user (that is the user that loged in into the GUI and as long as he is loged in) manage the network. Opposed to the "normal" situation where connecting to the network is a system task, configured by root, starting at boot (runlevel 3 and above) and stopped on shutdown (in YaST this is called: "traditional with ifup").

    Now the network manage approach is allready full of pittfalls because in a Unix/Linux system there can be many logeed in users, even in the GUI and I realy do not know which of those users is then able to manage the network (I am not using network manager, but you could do some interesting tests here). But to me it is rather clear that when the user logs out, he stops managing. The power to manage then goes either to another loged in user (or not, this could be one of the tests) or to the next user to log in.

    Thus imho it is either "traditional with ifup" or networkmanager. As long as you allways (most of the time) connect to the same network (wired or wireless) you should go for traditional (imho that would include server only systems, desktops, laptops normaly not leaving the house).
    Henk van Velden

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,193
    Blog Entries
    3

    Default Re: How do you make network connections persistent when using NetworkManager

    You can check the thread:
    Gave up Knetworkmanager. Made Networkmanager-GNOME work on KDE4!
    and then define that connection to be available to all users.

    Or you can switch to using "ifup". I am currently using "ifup".
    openSUSE Leap 15.1; KDE Plasma 5;

  4. #4

    Default Re: How do you make network connections persistent when using NetworkManager

    Thanks, that's very interesting that the GNOME network manager allows this but KDE's doesn't.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: How do you make network connections persistent when using NetworkManager

    Quote Originally Posted by tk83 View Post
    Thanks, that's very interesting that the GNOME network manager allows this but KDE's doesn't.
    Who is the boss there? Which user? The one that loged in first?
    Henk van Velden

  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,193
    Blog Entries
    3

    Default Re: How do you make network connections persistent when using NetworkManager

    Quote Originally Posted by hcvv View Post
    Who is the boss there? Which user? The one that loged in first?
    If you use the gnome network manager, and set the connection to be shared with all users, then you are connected on boot - before anybody is logged in. And you stay connected on logout.

    When logged in, you can switch to a different WiFi network. But when you logout, it reverts back to the shared WiFi connection. It actually works rather well. It's a pity that the KDE network manager applet does not support this.
    openSUSE Leap 15.1; KDE Plasma 5;

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: How do you make network connections persistent when using NetworkManager

    To me that is a combination of "ifup" from the standard config, to be overuled (if wanted) by the end-user networl manager interface for the duration of the login.

    Not a bad idea. Do you configure the basic connection with YaST and the "traditional with ifup" method?
    Henk van Velden

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,193
    Blog Entries
    3

    Default Re: How do you make network connections persistent when using NetworkManager

    NetworkManager is using keeping the configuration for this in "/etc/NetworkManager/system-connections", and the gnome nm-applet will create such entries. The KDE network manager has a selection for "System Connection" but it is always grayed out.

    Back when I was running 11.0, NetworkManager was using the "ifup" configuration for a system connection. It isn't using that now.
    openSUSE Leap 15.1; KDE Plasma 5;

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: How do you make network connections persistent when using NetworkManager

    Thanks for this information. Seems that I have to read a bit more about NetworkManager (I do not use it, but it is still interesting).

    I suppose that the configuration of the system connection is to be done by root. I guess that is what YaST > Network Devices > Network configuration does that when you choose for not "ifup"? instead of doing it in the /etc/sysconfig/network/ifcfg* files. Is that correct (I rather would not test this in a production system here)?
    Henk van Velden

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,193
    Blog Entries
    3

    Default Re: How do you make network connections persistent when using NetworkManager

    NetworkManager is mostly for laptops, anyway. I would not use it on a server.

    When you enable NetworkManager, the "ifup" scripts instead start NetworkManager running as root (as a daemon). The KDE and gnome apps communicate with it, I think via udev. But the applets are just user-accessible front-ends, and the actual setting up of the network is done by the daemon running as root. (Or, at least, that is my understanding of how it works).

    Currently, I have my laptop using "ifup". I keep several versions of the "/etc/sysconfig/network/ifcfg-*" files. It isn't very difficult to move the desired version into place, and then do "/etc/init.d/network restart". However, you will need to switch to using "dhclient" to handle the DHCP. It seems that "dhcpcd" caches too much information and that won't work when switching wifi networks.
    openSUSE Leap 15.1; KDE Plasma 5;

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •