LinuxCommandLibrary

kwallet-query

Query and manage KDE Wallet contents

TLDR

List all entries in the Passwords folder of kdewallet

$ kwallet-query [kdewallet] [[-l|--list-entries]]
copy

List all entries in a specific folder
$ kwallet-query [kdewallet] [[-l|--list-entries]] [[-f|--folder]] [folder_name]
copy

List all available folders
$ kwallet-query [kdewallet] [[-l|--list-entries]] [[-f|--folder]] ""
copy

Display help
$ kwallet-query [[-h|--help]]
copy

SYNOPSIS

kwallet-query [options] wallet entry [key]

PARAMETERS

-h, --help
    Display usage summary and options.

-V, --version
    Print version information.

--folder FOLDER
    Specify folder containing the entry (default: root).

DESCRIPTION

kwallet-query is a command-line utility for retrieving data from KDE's KWallet, a secure storage system for passwords, credentials, and sensitive information in Plasma desktop environments. It enables scripted access to wallet entries without graphical tools like kwalletmanager, ideal for automation, shell scripts, or headless systems.

To use it, specify a wallet name (default: kdewallet), an entry name (representing a record or folder), and optionally a key. If a key is provided, kwallet-query outputs its value. Without a key, it lists all keys and values in the entry as key=value pairs.

The tool interacts with the kwalletd daemon, which must be running. If the wallet is locked, it prompts for the passphrase interactively. This makes it unsuitable for fully non-interactive environments unless the wallet is pre-unlocked.

Common use cases include fetching stored application passwords, network credentials, or custom data. For instance, scripts can query Wi-Fi passwords or IMAP credentials stored by KDE apps. Security relies on KWallet's encryption (GPG or Blowfish), ensuring data protection at rest.

Limited to read operations, it complements write tools indirectly via config or other utilities. Available in Plasma workspaces package.

CAVEATS

Requires running kwalletd daemon and KDE Plasma; prompts interactively if wallet locked; read-only; wallet/entry names case-sensitive.

EXAMPLES

kwallet-query kdewallet Applications "Firefox" password
Retrieves Firefox password.

kwallet-query --folder Network mywifi
Lists all keys in 'mywifi' entry under Network folder.

HISTORY

Introduced in KDE 3.x (~2004) as part of KWallet framework; evolved through KDE 4 and Plasma 5/6; maintained in plasma-workspace package for backward compatibility.

SEE ALSO

kwalletmanager(1), kwalletd(8)

Copied to clipboard