Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Kwallet not working as it should (Read 640 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Kwallet not working as it should

I use kde plasma with kwallet as keyring with dinit. Whenever I launch protonvpn at boot, the kwallet password prompt doesn't appear and I can't connect to a vpn. It works only after I launch kwalletmanager and then running protonvpn and then the password prompt appears. Also Discord does not ask for a wallet password as well.

I tried everything including disabling and re-enabling kwallet, removing the config file and removing and readding my wallets. My default is 'kdewallet'.

I never had this use case with gnome-keyring. It used to work perfectly with all apps and promptly asked for my password including discord, protonvpn and other software. But I don't want to have two keyring services which do the same thing. I want to use kwallet instead.
 
Can anyone please help me with this? Does this have to do with the secret service not starting properly?(which I do have enabled and disabled and re-enabled during troubleshooting)
Any help is very much appreciated. Thank you.

Re: Kwallet not working as it should

Reply #1
Looking into system processes list after boot immediately shows that "kwalletd6" is not running. This is probably the cause but what is the best solution for this? There is no option for it to be autostarted by kde itself. Should I write an autostart script for this?

Re: Kwallet not working as it should

Reply #2
I temporarily(unless this is the definitive solution for this because I don't use systemd) fixed this by making it autostart at login, and it works good, I'm not marking this as solved without at least one or two comments or better alternative solutions since I'm no expert at this. Please offer any views or advice whatever they maybe. Thanks.

Re: Kwallet not working as it should

Reply #3
kwallet6 installs file /usr/share/dbus-1/services/org.kde.kwalletd6.service which should normally be sufficient.
Is the dbus-broker service active?

artist

Re: Kwallet not working as it should

Reply #4
@Artist I didn't know about that. But obviously not. It doesn't work for me and there is no kwalletd running in my processes unless I run it myself at which point kwallet does work. Also no, I haven't installed dbus-broker because it obviously needs systemd and there is no service file for it. I don't know if it runs without one on Artix. Is it necessary for kwallet?

Re: Kwallet not working as it should

Reply #5
I don't use kwallet but do need and use dbus-broker. It is available in our world repo and does not require a separate service.

artist

Re: Kwallet not working as it should

Reply #6
I see, but how do we know it's running? For systemd we know that there's the units file. What about on artix?

I just checked the package and there is nothing of a start file, just the binary. Also there is no instance running of it after I did a reboot. Nor of kwallet @Artist

Re: Kwallet not working as it should

Reply #7
I'm pretty sure you don't need dbus-broker. I use KDE, kwallet is started automatically by dbus. I don't have dbus-broker.
With the caveat that I use openrc not dinit. I'd expect the same behaviour but can't guarantee it as I have little dinit experience.

It's supposed to work something like this:
KDE starts dbus automatically (It didn't always, once I had to use exec dbus-launch --exit-with-session startplasma-x11 in ~/xinitrc but for a long time now I don't have to, exec startplasma-x11 is fine and KDE starts dbus

KDE will use dbus for various things one of which is starting kwallet.
It does this (simplified) by looking for the Exec= line in the dbus service file (in /usr/share/dbus-1/services)  which contains
Name=org.kde.kwalletd6
This Exec= line runs /usr/bin/kwalletd6

So possibly your workaround is doing the same thing? I say possibly as you don't state what you are running with your autostart ? kwalletd6 or kwalletmanager
But regardless your workaround is working for you to start kwallet.

The problem is it shouldn't be necessary.
If dbus is not starting kwalletd6 then there's a reasonable chance dbus is not running at all as a user session. No user dbus session will cause other issues within KDE.

There's other approaches to check this but this is one.

Install htop if you don't have it.
Boot into KDE.
in konsole run htop.
Press F4 ('Filter')
Type 'dbus'
You should see several lines( or at least two) with dbus processes.
If you see no lines with the 2nd column showing your username then you have no dbus user session and that's the root of the problem.

 

Re: Kwallet not working as it should

Reply #8
My autostart is through 'dbus-launch startplasma-wayland' aliased. And I do have 3 dbus-daemon processes running as of typing right now(rebooted with kwallet autostart disabled)

Re: Kwallet not working as it should

Reply #9
My autostart is through 'dbus-launch startplasma-wayland' aliased. And I do have 3 dbus-daemon processes running as of typing right now(rebooted with kwallet autostart disabled)
Ok

May I suggest you start to give more detail when you describe your issues as you'll likely get more useful responses and waste less of peoples time.
"making it autostart at login". The problem with the word 'it' is that it may be clear in your mind what 'it' refers to. To anyone else we can only guess.

Re: Kwallet not working as it should

Reply #10
Sorry for being late, but I found the solution and much to my surprise and  ignorance it was right there in the Arch wiki.
For anyone else having this problem, you need to create a dbus service file for it. gnome-keyring comes with one, but kwallet does not(which explains why it autostarts, and kwallet does not), I thought dbus activated stuff automatically when it came to wallets, I didn't know the secret service was just the wallets being started and thought it was sorta it's own thing. I was clearly wrong, regardless the issue is now resolved. Thanks for everyone who helped and sorry for the delay.
Also @gripped sorry I wasn't clear on my posts. Have a nice day and thanks for your help.
Marking the issue as solved.