Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

257.13. kwallet-6.31.0

KDE Frameworks: the KWallet client API, kwalletd6 and ksecretd, the session Secret Service that keeps the wallets

6.31.0-1 · LGPL-2.0-or-later AND LGPL-2.0-only AND LGPL-2.1-or-later AND GPL-2.0-or-later AND CC0-1.0 AND (LGPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL) · 3.8 SBU · 1.8 MiB, 35 files · 43_toolkits, 47 of 344 · ports/core/kf6/kwallet

Homepage: https://invent.kde.org/frameworks/kwallet

Why it is in KDOS. The comment above the 61 ports from karchive to kfilemetadata in script/phases/43_toolkits/packages.d/kf6.txt:

The libraries KDE applications are built on, without Plasma.

KWallet is KDE’s password store, in three programs and a library. KF6::Wallet is the client API KDE applications store passwords with: browser and mail logins, and the Wi-Fi and VPN secrets of the Plasma network applet. ksecretd is the store itself. It keeps each wallet as an encrypted file, ~/.local/share/kwalletd/<wallet>.kwl, sealed with Blowfish under a key derived from the wallet password by PBKDF2-SHA512 from libgcrypt, or with a GnuPG key, and it serves three D-Bus names: org.freedesktop.secrets, the freedesktop Secret Service that libsecret, QtKeychain and Python’s keyring are clients of; org.kde.secretservicecompat, the same interface under a name of KDE’s own; and org.freedesktop.impl.portal.desktop.kwallet, the secret back end xdg-desktop-portal hands to sandboxed applications. kwalletd6 keeps the older KWallet D-Bus API, org.kde.kwalletd6, alive for every program that still speaks it, and turns each call into a Secret Service call to ksecretd. kwallet-query reads and writes entries from a shell.

At a password login kwallet-pam runs ksecretd --pam-login with a hash of the login password, so the default wallet, kdewallet, opens with no prompt when it has the same password. The program it starts is KWALLETD_BIN_PATH from the installed KF6WalletConfig.cmake, which names /usr/bin/ksecretd. kwalletmanager is the window for browsing and editing wallets.

Depends on: cmake, ninja, pkgconf, extra-cmake-modules, qt6-qtbase, kcolorscheme, kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, knotifications, kwidgetsaddons, kwindowsystem, libgcrypt, libsecret, qca, gpgme, gpgmepp.

Required by (18): falkon, juk, kaccounts-integration, keepsecret, kget, kio, knights, konqueror, konversation, krfb, kup, kwallet-pam, kwalletmanager, libkgapi, libksane, okular, plasma-workspace, signon-kwallet-extension.

Sources: kwallet-6.31.0.tar.xz (368.6 KiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/43_toolkits/phase.env && kpkg install kwallet'

build.sh:

cmake -S . -B build -G Ninja \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D KDE_INSTALL_LIBDIR=lib \
	-D CMAKE_BUILD_TYPE=Release \
	-D KDE_INSTALL_USE_QT_SYS_PATHS=ON \
	-D BUILD_TESTING=OFF \
	-D KF_SKIP_PO_PROCESSING=ON \
	-D BUILD_KSECRETD=ON \
	-D BUILD_KWALLETD=ON \
	-D BUILD_KWALLET_QUERY=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_Gpgmepp=ON \
	-D CMAKE_REQUIRE_FIND_PACKAGE_KF6DocTools=ON \
	-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build

Programs: ksecretd, kwallet-query, kwalletd6.

Libraries: libKF6Wallet.so, libKF6WalletBackend.so.

Directories: /usr/include/KF6/KWallet, /usr/lib/cmake/KF6Wallet, /usr/share/licenses/kwallet.

Where kwalletd6 sends its calls is kwalletrc, [KSecretD] Enabled. True, the default, means ksecretd under org.kde.secretservicecompat; false means whichever program owns org.freedesktop.secrets. The port ships no kwalletrc, so the default holds. A KF6::Wallet client calls org.kde.kwalletd6, which D-Bus activates kwalletd6, whose first request in turn activates ksecretd. org.freedesktop.secrets has no activation file: ksecretd claims it when it starts, unless kwalletrc sets [org.freedesktop.secrets] apiEnabled=false. A libsecret client such as secret-tool therefore finds the store only once ksecretd is running, from kwallet-pam at login or from an earlier KWallet request.

Only one program can own org.freedesktop.secrets. keepassxc offers the same name when its own Secret Service integration is turned on, and the program that starts second does not get it; its clients then talk to the other one’s store. KeePassXC’s integration is off until the user turns it on in KeePassXC’s own settings, so out of the box ksecretd keeps the name.

With an automatic login no password passes through PAM, so kwallet-pam has nothing to open the wallet with, and the first program that needs a secret brings up ksecretd’s password prompt (or, before any wallet exists, its first-use wizard).

The Secret Service protocol lets a client encrypt each secret in transit; ksecretd supports the plain and dh-ietf1024-sha256-aes128-cbc-pkcs7 session algorithms, and negotiates the second through qca, whose OpenSSL provider ships in the same package. ksecretd and the library install no systemd unit. With WITH_X11 at its default, on, ksecretd places its dialogs over an X11 client’s window when it runs on X11 itself, through kwindowsystem’s X11 half; in a Wayland session that code is not reached.