New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request]: Support exporting scripts #5395
Comments
My idea was that in addition to Then we are able to add the native messaging host path to the list at https://github.com/flatpak/flatpak/blob/main/common/flatpak-dir.c#L7984 and - provided the binary name is one of the commands above - substitute the executable name for the wrapper script which is added above. Note that the standard does not allow passing arguments to these native host binaries, which is why we must go via the wrapper script. Personally I believe that having a general-purpose multiple binary export mechanism is more useful for other cases than having a special-case just for native messaging hosts. Unsolved so far in this plan is how can the browsers discover the exported native messaging hosts, which will be in a non-standard path (on XDG_DATA_DIRS, but not necessarily checked by the browsers or the web extension portal)? |
If I remember correctly we allow dashes in the last dot-separated segment of an app ID, so they might have to be
A good concrete use-case for this might be that Are you saying that Maybe it should also export |
Or, they could be named like |
👍
I'm relaxed on whether we effectively prepend
Yeah maybe a + is safer to avoid aliasing. You just know someone will export a command named |
At the With Steam's use case in mind, it would maybe be best to have syntax like |
Hmm... I'm a little skeptical here about whether we really need the renaming. Mostly because it causes me to go back and question the behaviour of automatically exporting the --command, because it doesn't have the opportunity to be renamed. Inspecting the bin/ dirs of the Flatpaks I have installed, overwhelmingly the binaries are named "normally" in bin, and even those with wrappers manage to give the wrapper the expected name, and the underlying binary is named or located differently (be it foo.bin, or /app/extra/..., or /app/appname/appbin, etc). |
Yes, I can see an argument that the Steam Flatpak should rename the underlying executables provided by Valve to |
Add and --export-command=COMMAND option to the build-finish command, export it under the exported-commands key in the metadata file, and generate APPID-command shell wrappers for each of them. Fixes #5395
Anything left to do here, or should we merge this? |
Checklist
Suggestion
In flatpak/xdg-desktop-portal#705, we are working on supporting the web browsers 'native messaging host' mechanism in flatpaks, via a portal. In order to support using flatpaked apps as messaging hosts, it would be very useful if flatpak allowed exporting script wrappers that are a bit more flexible than the generated ones we have now.
See flatpak/xdg-desktop-portal#705 (comment) for a detailed discussion.
The text was updated successfully, but these errors were encountered: