Add alias in flatpak environment

Hi. Is it possible to add an alias in a flatpak environment?
So if the app in question is hardcoded to run for example the wine command I could use the version installed in host by setting an alias alias wine=flatpak-spawn --host wine.

Wine here being just an example, it would possibly work with all commands available in host.
I understand that this would escape the confinement, but it could be useful.

If you are the flatpak maintainer of the app, you can add a script to do so.

That’s what FreeCAD does to call OpenSCAD (and it does it using the flatpak)

You mean adding in the flatpak a wine shell script in /bin that runs the flatpak-spawn command?
It’s not a bad idea…

1 Like

in /app/bin. Yes.

Like this:

The manifest part (installation):

You need add --talk-name=org.freedesktop.Flatpak to the finish-args.