frankosterfeld / qtkeychain

Platform-independent Qt API for storing passwords securely.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Add ability to choose the backend from an environment variable.

jeberger opened this issue · comments

Background: I don't have a full DE environment, I use AwesomeWM plus some KDE services (eg. kwallet) as appropriate. Now when I start an application that relies on qtkeychain (eg. nextcloud client), I have a choice between two bad solutions:

  • If I set XDG_CURRENT_DESKTOP=KDE and KDE_SESSION_VERSION=5, then qtkeychain uses kwallet, but nextcloud tries to use the KDE notification tray, so the tray icon does not work.
  • If I don't set the abovementioned variables, then nextcloud uses the standard X11 tray protocol and I have a tray icon, but qtkeychain attempts to use libsecret and fails to store my passwords.

It would be nice if there was a way to select the backend independently from the DE environment, eg. through a QTKEYCHAIN_BACKEND environment variable.

This had a PR in #75 and a complementary solution in #103 , but both seem abandoned atm.
If one has to be chosen, I would prefer the environment variable approach, since that can be set individually for each program.