#1036590 gajim: Insists on creating a kwalletd keystore, preventing startup

Package:
gajim
Source:
gajim
Submitter:
Matt Marjanovic
Date:
2026-07-06 17:37:14 UTC
Severity:
normal
Tags:
#1036590#5
Date:
2023-05-23 05:56:34 UTC
From:
To:
Dear Maintainer,

After an upgrade (not sure what the prior, not-broken version was), on startup
gajim now insists on opening a keystore/password store... a "KDE Wallet Service"
window keeps popping up (and annoyingly grabbing focus, preventing one from
doing anything else on the desktop).  Hit Cancel, it pops up again in a few
seconds.

Every time Cancel is hit, the following errors dumped to terminal:

05/22/2023 22:49:27 (E) gajim.c.passwords          Request password failed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gajim/common/passwords.py", line 100, in get_password
    return _interface.backend.get_password('gajim', account_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/keyring/backends/chainer.py", line 49, in get_password
    password = keyring.get_password(service, username)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/keyring/backends/kwallet.py", line 111, in get_password
    raise KeyringLocked("Failed to unlock the keyring!")
keyring.errors.KeyringLocked: Failed to unlock the keyring!


gajim also puts up a password dialog, and what I expect is to be able to simply
enter my password in that dialog and hit enter.

If I do manage to enter my password in that dialog, while dodging the KDE wallet dialogs,
then gajim does appear to connect to my account normally --- BUT, the wallet dialogs
just keep coming anyway.  There does not seem to be any way to make them stop unless
I kill gajim.

#1036590#12
Date:
2023-05-23 21:17:58 UTC
From:
To:
A follow-up:

There appear to be a couple of layers of bugs involved with this misbehavior.

What is happening:

   The configuration for an account (stored in a sqlite database) can/should have a
   boolean parameter named "savepass".  If "savepass" is missing, the default value
   is "True".  (See gajim/common/setting_values.py)

   In my config db, for reasons unknown to me, the "Local" account has no "savepass"
   parameter.  Thus gajim treats it as "savepass == True" for this account, and that
   triggers the unstoppable kwallet dialogs.

I do not actually use the Local account, so after a battle with the kwallet
dialogs, I was able to turn off "Connect on startup" for this account.  Upon a
restart, gajim no longer tries to connect to that account and no longer insists
on getting a password from a wallet.  This lets me get on with using gajim.

However, the Local account still has no savepass parameter, and I know of no way
to provoke gajim to provision one.


There appear to be (at least) three bugs involved here:

  1) The default value for "savepass" should probably be False (or even None, with
     a code path that tries to solve the problem of whether or not there is a
     saved password involved).

  2) If accessing a keystore/wallet fails, e.g. because someone hits a Cancel button,
     then gajim should take the hint and quit demanding access to a non-existent keystore.

  3) There needs to be a mechanism to reset/clear the "savepass" parameter --- i.e.,
     a mechanism to tell gajim to _stop_ storing the password in a keystore.