Flathub needs a policy about command-line tools

Continuing the discussion from Please remove "Hardware Probe" — it is not a desktop application, and has surprising network activity:

I think the specific issue with the application discussed in that thread is resolved, but there’s still a general issue.

Right now, GNOME Software, and presumably other Flathub-enabled software centers, do not have a way to present command-line applications in a meaningful way to users. This means that even when the tool doesn’t do something surprising (let alone malicious), it’s a bad experience — the user installs and then hits the “Open” button and nothing happens, and then when they search in the desktop environment, can’t find it anywhere.

Flathub needs a policy that all such packages should be hidden from accidental discovery, until there is software center client support for them. Otherwise, distros need to put big warnings on any suggestions to non-expert users that they look at Flathub as a software source.

1 Like

Flathub and GNOME Software do not list CLI applications so there is no way to install/launch/view them from there.

Hardware probe is an exception because its appstream component type is desktop-application instead of console-application.

A potential solution would be to unlist desktop-application for which there is Terminal=true in the desktop file .

Or simply disallow this behavior on flathub.org


One of the responses I got, which surprised me, was basically “this is fine actually”.

Stop putting words into people’s mouth please and consider showing some appreciation for the positive outcome.

Also I am not a Flathub maintainer and I do not speak on behalf of Flathub.

Failing on desktop-application with Terminal=true might be a good addition to appstream-glib validate.

Maybe open an issue on https://github.com/hughsie/appstream-glib/issues to see what hughsie thinks of it?

2 Likes

I’m sorry; I don’t mean to pick a fight. I’ve removed that comment from my post above. I misunderstood your comments about the lack of a policy against command line applications claiming to be desktop applications as an endorsement of those applications doing that. But even the misunderstanding does not justify my being rude about it. Again, sorry.

I think we are actually in agreement that this should be disallowed?

1 Like

Thank you.

I think we are actually in agreement that this should be disallowed?

Yes.

How this is implemented in Snap? They have same desktop files, but Launch button works properly.

This discussion is not about supporting terminal apps.

It’s about having a policy to forbid terminal apps from being listed on flathub / GNOME Software. At least for the time being.

I’m not disagreeing, and we pay attention to CLI applications being marked as such during submission. Hardware Probe was accepted 3 years ago before we started making the review process more strict. It doesn’t mean CLI applications are forbidden on Flathub, but they need to be designated as console-applications or should not ship metainfo at all.

For the record. we do allow TUI applications with the type set to desktop-application as long as desktop launcher has Terminal=true.

1 Like

So is there a guide on how to submit a CLI app? e.g. what things need to be included, excluded, any change versus the usual PR on GitHub/Flathub.

1 Like

I think the best thing right now is to send the PR and be guided by the reviewers.

In general, we have two kind of levels:

  1. CLI app
  2. ClI app that’s shown on the website

Best case would be to have good metadata, desktop entry, an icon and screenshots.
Here’s an example GitHub - flathub/com.geekbench.Geekbench6

1 Like

This ideal still has some issues.
in this specific example, you need to avoid opening it via clicking on launch.
as that will open a temporary CLI, run the benchmark, and then close the CLI.
which deletes the results of the benchmark.

you must instead manually open a terminal and then run it with an unwieldly

flatpak run com.geekbench.Geekbench6

now you will be able to see the results when finished since you ran it through an already opened CLI

That is probably a problem with the console you are using not supporting it. Mine doesn’t close, but keeps open after that.

There’s nothing in the desktop-entry spec requiring the terminal to stay open. I don’t think Terminal=true was really intended for this use case. And in fact, I wouldn’t want the terminal to stay open after quitting a real TUI application, e.g. htop.