Connect to enterprise (802.1X) Wi-Fi networks from the network panel#6334
Connect to enterprise (802.1X) Wi-Fi networks from the network panel#6334KazeTachinuu wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds WPA/WPA2-Enterprise (802.1X) Wi‑Fi join support to the network panel by detecting EAP security and creating the required NetworkManager profile via nmcli, while keeping the existing PSK flow intact.
Changes:
- Add an enterprise (EAP) credential UI path with an identity field alongside the passphrase prompt.
- Implement an out-of-band
nmcli-driven connect flow for PEAP/MSCHAPv2 networks and hook it into the panel’s existing connect/failure tracking. - Introduce a reusable
nmcliscript string in the panel model for (re)creating and activating the EAP profile.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| shell/plugins/panels/network/Panel.qml | Adds enterprise detection, identity input, and a Process-based nmcli connect path integrated with existing action tracking. |
| shell/plugins/panels/network/Model.js | Adds the enterpriseConnectScript used by the panel to create/activate an 802.1X NetworkManager profile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var wifi = root.networkForSsid(root.actionSsid) | ||
| if (wifi) root.failNetworkAction(wifi.network, ConnectionFailReason.WifiClientFailed) | ||
| } |
|
|
||
| onAccepted: pwField.forceActiveFocus() | ||
| onTextChanged: if (row.isPasswordOpen && text !== root.identityText) root.identityText = text | ||
| Keys.onEscapePressed: { root.passwordSsid = ""; root.passwordText = "" } |
| } | ||
| onAccepted: row.submitCredentials() | ||
| onTextChanged: if (row.isPasswordOpen && text !== root.passwordText) root.passwordText = text | ||
| Keys.onEscapePressed: { root.passwordSsid = ""; root.passwordText = "" } |
| var enterpriseConnectScript = | ||
| "nmcli connection delete id \"$1\" >/dev/null 2>&1;" + | ||
| " nmcli connection add type wifi con-name \"$1\" ssid \"$1\"" + | ||
| " wifi-sec.key-mgmt wpa-eap 802-1x.eap peap 802-1x.phase2-auth mschapv2" + | ||
| " 802-1x.identity \"$2\" 802-1x.password \"$3\" 802-1x.auth-timeout 8" + | ||
| " && nmcli connection up id \"$1\"" + | ||
| " || { nmcli connection delete id \"$1\" >/dev/null 2>&1; false; }" |
8dddec2 to
840832c
Compare
| function connectEnterprise(ssid, identity, passphrase) { | ||
| runNetworkAction("connect", networkForSsid(ssid), function(network) { | ||
| Quickshell.execDetached(["bash", "-c", Model.enterpriseConnectScript, "nmcli-eap", ssid, identity, passphrase]) | ||
| }) | ||
| } |
| runNetworkAction("connect", networkForSsid(ssid), function(network) { | ||
| Quickshell.execDetached(["bash", "-c", Model.enterpriseConnectScript, "nmcli-eap", ssid, identity, passphrase]) | ||
| }) |
| function connectEnterprise(ssid, identity, passphrase) { | ||
| runNetworkAction("connect", networkForSsid(ssid), function(network) { | ||
| Quickshell.execDetached(["bash", "-c", Model.enterpriseConnectScript, "nmcli-eap", ssid, identity, passphrase]) | ||
| }) | ||
| } |
|
|
||
| var enterpriseConnectScript = | ||
| "u=$(uuidgen);" + | ||
| " nmcli connection add type wifi con-name \"$1\" ssid \"$1\" connection.uuid \"$u\"" + |
|
Hey @KazeTachinuu, I’ve implemented this as a migration in my PR (#6321). I think your PR (#6334) is the next step, since you’re working on the UI side of it. |
The network panel only supports PSK Wi-Fi, so eduroam and other 802.1X networks can't be joined from the UI (#2382, #2351, #2076); #6321 imports old iwd networks but leaves enterprise ones for manual re-add.
Detect 802.1X networks from their advertised security type and expand the passphrase prompt with an identity field. Connecting creates the NetworkManager profile with nmcli (PEAP/MSCHAPv2) and activates it through the panel's existing tracking, since Quickshell's networking API can't create profiles. PSK behavior is unchanged.