Open stloeffler opened 3 years ago
This works for me:
Running the flatpak with the permission --talk-name=org.freedesktop.Flatpak
flatpak run --talk-name=org.freedesktop.Flatpak org.tug.texworks
and adding the external command as flatpak-spawn --host <command> <args>
According to https://docs.flatpak.org/en/latest/sandbox-permissions.html#filesystem-access, the host's
/usr
is mounted under/var/run/host/usr
. Adding the relevantbin
paths under that folder allows TeXworks to access them (see the currently unused binpaths.patch).However
It would be possible to set
LD_LIBRARY_PATH
, but doing so globally when invoking TeXworks is not a good idea (for the same reason as above - this could potentially run TeXworks with incompatible host libraries instead of the sandbox libraries). One possibility would be to modify the Tw sources to setLD_LIBRARY_PATH
only when running executables from the host (i.e. from somewhere under/var/run/host
), but determining the proper settings (at runtime) is probably not trivial.