Let's say you don't want to install Visual Studio Code from their package repository but use the flatpak package instead. This works but as soon as you try to execute any binaries from your regular PATH
they won't be found since that's blocked by the sandbox. Even giving full host filesystem access won't work reliably because that filesystem will be mounted under /run/host
which messes up any absolute paths which are often baked into the most unexpected places.
After lots of digging I found this solution from the qutebrowser flatpak maintainer. Just in case Reddit dies a copy can be found below.
I assumed that the mentioned flatpak-spawn-wrapper
was a feature shipped in all flatpaks but it looks like only flatpak-spawn
is included and that wrapper is a [script](https://github.com/flathub/org.qutebrowser.qutebrowser/blob/master/