I3 alongside KDE; no Wi-Fi, no mail accounts for Google Chrome (KWallet problem?)

Hi,

Ordinarily I use KDE with the i3 WM, Google Chrome as my main browser, with my mail accounts employed for bookmarks syncing, etc. It just works, probably because KWallet (?) takes care of all this, and of the Wi-Fi password, too.

I’ve been trying to log into i3 as a DE. NetworkManager.service is running, it can manage Ethernet, but can’t connect to Wi-Fi. Google Chrome knows nothing of my mail accounts, probably due to my KWallet being inactive.

What do I have to do in order to log in comfortably in any DE?

You need to have pam_kwallet_init and polkit-kde-authentication-agent-1 autostarted for everything to work as with KDE. I3 does not automatically use XDG Autostart, so you either need to choose a method to autostart for i3 and/or all login sessions or autostart using ~/.config/i3/config, for example adding:

exec --no-startup-id /usr/lib/pam_kwallet_init
exec --no-startup-id /usr/lib/polkit-kde-authentication-agent-1

Thanks!

Suppose I put exec statements into ~/.config/i3/config. I will use the same config while running KDE with i3 for a WM. Is it asking for trouble?

UPD:

No trouble with KDE + i3 after adding exec ... to config. Nothing changed for i3 login, as if config were the same.

You should be all good, the ~/.config/i3/config file will not interfere with KDE at all (as you have apparently seen).

I might be misinterpreting your reply - are you saying that adding the executables to the i3 config has not changed any application behaviour? Can you confirm that the executables are running? For example, ps aux | grep kwallet should show that it is running. You can try manually starting the executables from a console, and post any error outputs.

Apparently, the required executables started successfully.

i3:

$ ps aux | grep kwallet
alexey       923  0.0  0.3 238308 31036 ?        Sl   22:50   0:00 /usr/bin/kwalletd5 --pam-login 6 8
alexey      1217  0.0  0.0   6572  2396 pts/0    S+   22:52   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox kwallet

KDE:

~ ᐅ ps aux | grep kwallet
alexey       912  0.0  1.1 583080 90436 ?        Sl   23:00   0:00 /usr/bin/kwalletd5 --pam-login 6 8
alexey      2165  0.0  0.0   6576  2496 pts/1    S+   23:06   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox kwallet

NetworkManager.service with i3:

● NetworkManager.service - Network Manager
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; enabled; preset: disabled)
     Active: active (running) since Sat 2022-12-31 22:50:31 MSK; 3min 46s ago
       Docs: man:NetworkManager(8)
   Main PID: 452 (NetworkManager)
      Tasks: 3 (limit: 9361)
     Memory: 11.9M
        CPU: 509ms
     CGroup: /system.slice/NetworkManager.service
             └─452 /usr/bin/NetworkManager --no-daemon

Dec 31 22:50:52 gaucho NetworkManager[452]: <info>  [1672516252.6679] device (wlp3s0): supplicant interface state: disconnected -> interface_disabled
Dec 31 22:50:52 gaucho NetworkManager[452]: <info>  [1672516252.6679] device (p2p-dev-wlp3s0): supplicant management interface state: disconnected -> interface_disabled
Dec 31 22:50:52 gaucho NetworkManager[452]: <warn>  [1672516252.6680] device (wlp3s0): no secrets: No agents were available for this request.
Dec 31 22:50:52 gaucho NetworkManager[452]: <info>  [1672516252.6681] device (wlp3s0): state change: need-auth -> failed (reason 'no-secrets', sys-iface-state: 'managed')
Dec 31 22:50:52 gaucho NetworkManager[452]: <info>  [1672516252.6685] manager: NetworkManager state is now CONNECTED_LOCAL
Dec 31 22:50:52 gaucho NetworkManager[452]: <warn>  [1672516252.6692] device (wlp3s0): Activation: failed for connection 'ZyXEL'
Dec 31 22:50:52 gaucho NetworkManager[452]: <info>  [1672516252.6697] device (wlp3s0): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Dec 31 22:50:52 gaucho NetworkManager[452]: <info>  [1672516252.6766] device (wlp3s0): set-hw-addr: set MAC address to AE:F2:B3:85:E0:B7 (scanning)
Dec 31 22:50:52 gaucho NetworkManager[452]: <info>  [1672516252.7161] device (wlp3s0): supplicant interface state: interface_disabled -> inactive
Dec 31 22:50:52 gaucho NetworkManager[452]: <info>  [1672516252.7162] device (p2p-dev-wlp3s0): supplicant management interface state: interface_disabled -> inactive

ZyXEL is my Wi-Fi.

device (wlp3s0): Activation: failed for connection 'ZyXEL'

UPD:

In a way, nothing changed indeed. After commenting out the exec ... from i3/config:

#exec --no-startup-id /usr/lib/pam_kwallet_init
#exec --no-startup-id /usr/lib/polkit-kde-authentication-agent-1

i3 login:

$ ps aux | grep kwallet
alexey       923  0.0  0.3 238308 31036 ?        Sl   22:50   0:00 /usr/bin/kwalletd5 --pam-login 6 8
alexey      1217  0.0  0.0   6572  2396 pts/0    S+   22:52   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox kwallet

It’s been running all along.

Yes, pam_kwallet_init is for unlocking kwallet with your password. polkit-kde-authentication-agent-1 is for polkit authentication (e.g. for authentication when editing with Kate, or for KDE Partition Manager etc.).

Can you check whether kwallet is working correctly to unlock for any other applications, or is it just NetworkManager? I think you will still need it to unlock on login with the autostart, i.e. uncomment the lines again.

Does setting the wireless connection in NetworkManager to “all users may connect to this network” fix the unlock issue?

“all users may connect to this network” fixes the Wi-Fi issue. Account on Google Chrome is still “paused”. No wonder if the “user” is somehow different. What’s the correct approach? Naturally, I don’t want to log into my Google account again each time I change my DE.

UPD:

Yes, the accounts linked in any way to Google Chrome (icluding forum.manjaro) mostly get logged out when I log in back to KDE. This is pretty much unusable. How does it happen that I am not quite the same user with different DEs?

I don’t really have any experience with Google Chrome, sorry. I would suggest it may perhaps be best to open a new thread, with some more detail about your system and how you log in to KDE and I3 to get proper support for the Google Chrome issue.

How are you running Google Chrome from I3? The Arch wiki states that it should be run with either the --password-store=kwallet5 or --password-store=detect arguments. Have you ensured these arguments are enabled, and does it make any difference?

Thank you very much!

~ ᐅ cat .config/chrome-flags.conf
# Google Chrome start.

--password-store=detect

This works reasonably well. On change of DE is asks for the KWallet password; that’s probably a fair price. For some reason, on each start Google Chrome now opens three unsolicited tabs: https://google/, https://chrome/, and http://start./. The latter belongs to another theme, certainly :slight_smile: .

Glad that has helped :slight_smile: You might be able to see if you can tweak the behaviour using kwalletmanager, perhaps there is something not quite right or a setting that can be changed. I haven’t really looked at it, but it is supposed to expose more control of kwallet.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.