You are not logged in.

#1 2020-07-20 12:55:17

elParaguayo
Member
Registered: 2018-03-30
Posts: 51

Qtile - Network Manager not saving wifi password

I've been using KDE for a while on my laptop but wanted to try out a tiling window manager. Qtile seemed a good choice for me as, despite it being less popular than i3 and others, it's written in python which is the language I'm most familiar with so I'd be pretty happy creating my own widgets etc.

Anyway, back to the issue at hand... I've been using Network Manager to manage the various wifi networks/VPNs etc that I use. However, if I start Qtile (started from SDDM via an xsession file) then Network Manager doesn't automatically connect to the wifi. If I run nm-applet then I'm asked for the wifi password. I can enter the password but it's not persistent over sessions.

When using KDE, the passwords are stored with the option "Store password for this user only (encrypted)" which, I assume means that it's stored in a wallet, rather than in a file in /etc/NetworkManager/system-connections/.

As I see it, I have a few options:
1) Store the passwords in plain text in the system-connections folds (I believe this means running the relevant Network Manager interface as root from Qtile - e.g. if adding a new connection)
2) Get Qtile to use KDE's wallet
3) Have Qtile store the password somewhere else
4) Or there's a more correct way to do this which I just don't know

I don't like option 2 as I may, one day, want a system without KDE on it so I'd prefer not to have those dependencies. I have a slight preference for #3 as that would mean not having to add new connections as root.

Looking at the Network Manager page on the wiki, I can see that the user needs certain permissions. I chose option 3, added myself to the network group and created the polkit file. I noticed the warning about needing an active session but had assumed this would be satisfied.

However, every time I log on, I'm asked for the wifi password so I'm clearly missing something. My question is therefore, what's the "correct" way to have Network Manager store passwords when not using a fully-fledged desktop environment?

Offline

#2 2020-07-20 14:35:15

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: Qtile - Network Manager not saving wifi password

Can you start KDE normally but just replace the window manager (kwin) with Qtile?

Offline

#3 2020-07-20 15:31:25

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,456

Re: Qtile - Network Manager not saving wifi password

I think you're assuming incorrectly that the polkit configuration deals with the password encryption. I think the polkit configs only allow you to modify connections as non-root. For WiFi passwords you either do clear-text, or use a keyring for encryption/decryption. AFAIK, NetworkManager only supports GNOME keyring and KDE wallet.
You can run gnome-keyring without installing GNOME, I think it comes with relative few dependencies (gtk3 is needed, of course). I think kwallet brings in more KDE deps comparably, but arguably you can run both keyrings without their respective DE.

Offline

#4 2020-07-20 15:34:48

elParaguayo
Member
Registered: 2018-03-30
Posts: 51

Re: Qtile - Network Manager not saving wifi password

Thanks. I agree my assumptions were probably incorrect.

I'll take a look at gnome-keyring and see if I can get that to work.

Offline

#5 2020-07-20 18:35:17

elParaguayo
Member
Registered: 2018-03-30
Posts: 51

Re: Qtile - Network Manager not saving wifi password

Looks like kwallet is starting automatically anyway when I log in to qtile from SDDM (which makes sense as it's in the pam rules) but it's still not saving the password. And, actually, if it's using the kwallet that I use for KDE then the passwords are already there so it should use them.

I guess I'm still missing something.

Offline

Board footer

Powered by FluxBB