Bug 505514 - `kleopatra --help` returns a modal stating "Unknown option" when it's already running
Summary: `kleopatra --help` returns a modal stating "Unknown option" when it's already...
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (other bugs)
Version First Reported In: 4.0.0.250402
Platform: unspecified All
: NOR minor
Target Milestone: ---
Assignee: Ingo Klöcker
URL: https://forum.gnupg.org/t/kleopatra-c...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-12 10:12 UTC by Roke Julian Lockhart Beedell
Modified: 2025-06-12 10:33 UTC (History)
3 users (show)

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


Attachments
A Screenshot Of The Modal (9.81 KB, image/png)
2025-06-12 10:12 UTC, Roke Julian Lockhart Beedell
Details
A Screencast Of The Flag Failing To Invoke When Kleopatra Is Running, Versus It Succeeding When It's Not (409.29 KB, video/webm)
2025-06-12 10:15 UTC, Roke Julian Lockhart Beedell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roke Julian Lockhart Beedell 2025-06-12 10:12:22 UTC
Created attachment 182223 [details]
A Screenshot Of The Modal

SUMMARY

Despite Kleopatra's `--help` option not existing, it exposes parameters to a POSIX shell, like its `--sign` flag. This shouldn't be so: if it exposes a parameter, basic documentation should be available from `--help`.

STEPS TO REPRODUCE

Invoke `kleopatra --help`.

OBSERVED RESULT

A modal appears stating "Unknown option".

EXPECTED RESULT

It should return the help in the CLI.

SOFTWARE/OS VERSIONS

> ~~~
> Operating System: Fedora Linux 42
> KDE Plasma Version: 6.3.5
> KDE Frameworks Version: 6.14.0
> Qt Version: 6.9.1
> Kernel Version: 6.14.9-300.fc42.x86_64 (64-bit)
> Graphics Platform: Wayland
> ~~~

ADDITIONAL INFORMATION

As discussed at https://forum.gnupg.org/t/kleopatra-command-line-to-sign-file/3857/5?u=rokejulianlockhart.

Should I also file a bug at https://bugs.kde.org/enter_bug.cgi?format=guided&product=docs.kde.org for the documentation at https://docs.kde.org/stable5/en/kleopatra/kleopatra/commandline-options.html#:~:text=kleopatra%20%2D%2Dhelp being incorrect? I presume not, since the fix is on Kleopatra's side, rather than the docs'. I would fix it myself temporarily, but I've been unable to locate its source.
Comment 1 Roke Julian Lockhart Beedell 2025-06-12 10:15:33 UTC
Created attachment 182224 [details]
A Screencast Of The Flag Failing To Invoke When Kleopatra Is Running, Versus It Succeeding When It's Not

(In reply to Roke Julian Lockhart Beedell from comment #0)

After checking https://forum.gnupg.org/t/kleopatra-command-line-to-sign-file/3857/6?u=rokejulianlockhart, I can confirm that this bug solely reproduces if `kleopatra` is already running. If I "Quit" it, then run `kleopatra -help`, it returns the help.
Comment 2 Ingo Klöcker 2025-06-12 10:29:54 UTC
Thanks for the report!

This has been fixed a few minutes ago. https://invent.kde.org/pim/kleopatra/-/commit/84fd608fa3cbbb8e4023b3bc451cb1701ac787fd

Note that I chose to keep it simple which means that if Kleopatra is already running then running `kleopatra --help` opens a window showing the help text instead of printing the help text to the terminal. Printing the help text to the terminal would have been much more difficult for technical reasons. (The command line arguments are handled by the already running Kleopatra which in general cannot print anything to the terminal in which `kleopatra --help` was run.)
Comment 3 Roke Julian Lockhart Beedell 2025-06-12 10:33:39 UTC
(In reply to Ingo Klöcker from comment #2)

Insofar as that text can be copied, I think that's fine: it's a graphical app, after all. Thanks!