flatpak spawnflatpakDeveloperAlexanderLarssonalexl@redhat.comflatpak spawn1flatpak-spawnRun commands in a sandboxflatpak-spawnOPTIONCOMMANDARGUMENTDescription
Unlike other flatpak commands, flatpak-spawn is available
to applications inside the sandbox. It runs COMMAND
outside the sandbox, either in another sandbox, or on the host.
flatpak-spawn uses the Flatpak portal to create a copy
the sandbox it was called from, optionally using tighter permissions and
the latest version of the app and runtime.
OptionsThe following options are understood:
Show help options and exit.
Print debug information
Forward a file descriptor
Run with a clean environment
Make the spawned command exit if we do
Set an environment variable
Use the latest version of the refs that are used to set up the sandbox
Run without network access
Run fully sandboxed.
See the and
options for selective file access.
Expose read-write access to a file in the sandbox.
Note that absolute paths or subdirectories are not allowed.
The files must be in the sandbox subdirectory of
the instance directory (i.e. ~/.var/app/$APP_ID/sandbox).
This option is useful in combination with (otherwise the
instance directory is accessible anyway).
Expose readonly access to a file in the sandbox.
Note that absolute paths or subdirectories are not allowed.
The files must be in the sandbox subdirectory of
the instance directory (i.e. ~/.var/app/$APP_ID/sandbox).
This option is useful in combination with (otherwise the
instance directory is accessible anyway).
Run the command unsandboxed on the host. This requires access to
the org.freedesktop.Flatpak D-Bus interface
The working directory in which to run the command.
Note that the given directory must exist in the sandbox or, when used in conjunction
with , on the host.
Examples$ flatpak-spawn ls /var/runSee alsoflatpak1