flathub-infra / flatpak-builder-lint

A linter for flatpak-builder manifests
MIT License
48 stars 115 forks source link

exceptions.json: allow flatpak-spawn --host from gplaces #344

Closed dimkr closed 4 months ago

dimkr commented 4 months ago

gplaces uses user-defined programs to handle non-text MIME types (for example, the default handler for images is chafa) and URL schemes it doesn't support (defaults to xdg-open). Without working flatpak-spawn --host, gplaces can be annoying to use because one needs to download a file and open it using a host application, or copy the URL and paste it in the browser.

bbhtt commented 4 months ago

If you use xdg-open, your desktop environment is supposed to show an app chooser dialogue with programs that can handle that mimetype.

image

Is this not working? Why would you need the ability to launch them directly?

bbhtt commented 4 months ago

There is an entry for this app on line 228

dimkr commented 4 months ago

Why would you need the ability to launch them directly?

gplaces doesn't use mimeapps.list: it has a configuration file that defines the command-line to use, per MIME type or URL scheme. It runs these handler programs directly, so it can stream to stdin (for example, it can write a video file to stdin of mpv). In addition, the default application is not guaranteed to be a sane default for gplaces: the default image viewer is likely to be a graphical application, while for gplaces, you'd probably want something like chafa (and this applications is installed on the host, not under PATH of gplaces' mount namespace).

(The handler for https:// URLs in the default gplaces configuration file, is xdg-open)

bbhtt commented 4 months ago

Do you have an example of a gemini site hosting images/mp3/mp4 that I can test out the feature with? It seems very hard to find one and the mp3 example in your readme seems to time out.

dimkr commented 4 months ago

gemini://auragem.letz.dev/music/stream/public_radio (audio)

gemini://auragem.letz.dev/youtube (video)

gemini://kwiecien.us/gemcast (audio)

gemini://gemi.dev/cgi-bin/wp.cgi/ (images)

bbhtt commented 4 months ago

Thanks, should be up in 10-15 minutes.

dimkr commented 4 months ago

Thank you!