I’ve forked a GTK app and I’ve just had a user report that “–help” isn’t working.
From what I can tell, it is working, but not in the way I’d expect.
The app is a
Gtk.Application and overrides
command_line(). It then uses
OptionEntry to parse the command-line arguments. This works fine when running a single instance of the app.
app --help prints the help info and quits.
But if you’ve already got an instance of the app open then
app --help just displays
GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying on the command-line and kills the existing instance of the app. If you ran the existing instance from a CLI as well then you see the help info printed there.
I think we need the “single instance” behaviour of Gtk.Application, but I wouldn’t expect
--help to print an unhelpful error message and kill the existing instance. Is it possible to keep the single instance behaviour and have the help output print to the current terminal?