Bug 491938 - The kwallet-query CLI command does not work when executed within a script.
Summary: The kwallet-query CLI command does not work when executed within a script.
Status: REPORTED
Alias: None
Product: frameworks-kwallet
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 5.115.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Valentin Rusu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-20 12:45 UTC by Andrey
Modified: 2025-01-02 16:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey 2024-08-20 12:45:55 UTC
SUMMARY

Running the kwallet-query CLI command in a script (e.g., an Ansible playbook) results in an error message, causing the command to abort.


STEPS TO REPRODUCE
1. Run kwallet-query --help inside a script (e.g., an Ansible playbook) without any display environment available.

OBSERVED RESULT
The script fails with the following error message:

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted

EXPECTED RESULT
The command should run successfully without needing to set the QT_QPA_PLATFORM variable and without producing any errors or warnings.

SOFTWARE/OS VERSIONS
OS Debian 13 trixie
KDE Plasma Version: 5.27.11 
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13

ADDITIONAL INFORMATION
Workaround:
Setting the environment variable QT_QPA_PLATFORM=offscreen allows the command to run, albeit with a warning message about missing platform plugins:
"kf.windowsystem: Could not find any platform plugin"