You are not logged in.
Is there any way to configure NetworkManager to connect before logging in? The wiki has a section "Automatically unlock keyring after login" but this isn't helpful to me, I'm using the PC as a fileserver and want to automatically connect to wifi on boot. Is this possible?
Offline
The thing that comes to my mind at the moment is to create a script that is run at boot to use wifi-menu to connect to the Wi-Fi. If you have created a profile using wifi-menu it should (if I remember correctly as I cannot test it atm) keep the password to the network and connect automatically.
Offline
if using wifi-menu, there is no need to write script, netctl is designed to work with wifi-menu.
Arch is home!
https://github.com/Docbroke
Offline
If it's set to start on boot, it should connect.
Offline
you need to tick the option "allow all users to connect to network" or something like that.
Offline
None of this makes much sense. Any service managed by systemd and enabled will start as soon as it can regardless of whether or not you've logged in to your desktop (or even to a tty). I've never used NetworkManager, but the wiki seems to confirm that it is no exception to this rule:
NetworkManager is controlled via NetworkManager.service. Once the NetworkManager daemon is started, it will automatically connect to any available "system connections" that have already been configured. Any "user connections" or unconfigured connections will need nmcli or an applet to configure and connect.
There is also no need to configure network manager to allow all users to do anything, as systemd starts the process with all needed privileges (unless you run NetworkManager under a --user session, which is not the normal use from what I can tell).
That said, most network connections can take several seconds to set up before they are fully active. If you do not have network access as soon as you are in your desktop, it may not be because NM is waiting for you to log in, but it is simply still in the process of connecting.
This leads me to suspect there may be an X-Y problem here. Is there an actual problem you are facing? What is it? What are the actual symptoms? Starting NM before you log in is not a solution you should pursue as - again - that is the default and likely what is already happening. But if there are symptoms you'd like to change, we need to know what they are in order to identify the actual problem and see if there might be a solution.
If you just want a connection faster, there might not be much that can be done if you need to wait for a dynamically assigned IP. Using a static IP *might* be faster (I have no experience with this so I'm not actually sure) - but again, we need to know what the actual problem is or symptoms are before any steps can be recommended.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
There is also no need to configure network manager to allow all users to do anything, as systemd starts the process with all needed privileges (unless you run NetworkManager under a --user session, which is not the normal use from what I can tell).
Allowing all users to connect to a network is the same as creating a "system connection" in your quote from the documentation. I can't remember exactly, but it says something like "allow all users to use this network".
Offline
This leads me to suspect there may be an X-Y problem here. Is there an actual problem you are facing? What is it? What are the actual symptoms? Starting NM before you log in is not a solution you should pursue as - again - that is the default and likely what is already happening. But if there are symptoms you'd like to change, we need to know what they are in order to identify the actual problem and see if there might be a solution.
If you just want a connection faster, there might not be much that can be done if you need to wait for a dynamically assigned IP. Using a static IP *might* be faster (I have no experience with this so I'm not actually sure) - but again, we need to know what the actual problem is or symptoms are before any steps can be recommended.
Yes, you may be right. I had a play with the "any users" option, but it didn't seem to help. As far as I can tell the problem is this:
KDE stores the wifi password in kwallet and the wallet is not unlocked until I log in.
Offline
KDE stores the wifi password in kwallet and the wallet is not unlocked until I log in.
Ah, thanks, that's what I was missing as I don't use these DE tools. But I know that this is not required to use NetworkManager. You can run networkmanager as a system service and provided it is configured at the system level rather than user level it will start immediately on boot.
A user wallet seems an odd place for a wifi password as the network connection is a system resource not a user resource.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Yep, that makes no sense at all. Even if it is the case, forget the GUI tools and just set up the connection with the cli tool or by hand (in /etc/NetworkManager/system-connections/).
Offline