A reimplementation of flatpak-spawn --host
.
Run commands on your host machine from inside your flatpak sandbox, toolbox or distrobox containers.
- Allocates a pty for the spawned process, fixing the following upstream issues: flatpak/flatpak#3697, flatpak/flatpak#3285 and flatpak/flatpak-xdg-utils#57
- Handles SIGWINCH (terminal size changes)
- Passes through
$TERM
environment variable - Shims host binaries when symlinked, see section below
If there's a process that only makes sense to be executed on the host system, you can
create a symlink to it somewhere in your $PATH and it'll always be executed through host-spawn
.
Example of creating a shim for the flatpak
command:
# Inside your container
$ flatpak --version
zsh: command not found: flatpak
$ ln -s /usr/local/bin/host-spawn /usr/local/bin/flatpak
# Now the flatpak command will always be executed on the host
$ flatpak --version
Flatpak 1.12.7