'\" t .\" Title: flatpak spawn .\" Author: Alexander Larsson .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 03/18/2023 .\" Manual: flatpak spawn .\" Source: flatpak .\" Language: English .\" .TH "FLATPAK SPAWN" "1" "" "flatpak" "flatpak spawn" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" flatpak-spawn \- Run commands in a sandbox .SH "SYNOPSIS" .HP \w'\fBflatpak\-spawn\fR\ 'u \fBflatpak\-spawn\fR [OPTION...] COMMAND [ARGUMENT...] .SH "DESCRIPTION" .PP Unlike other flatpak commands, \fBflatpak\-spawn\fR is available to applications inside the sandbox\&. It runs COMMAND outside the sandbox, either in another sandbox, or on the host\&. .PP \fBflatpak\-spawn\fR 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\&. .SH "OPTIONS" .PP The following options are understood: .PP \fB\-h\fR, \fB\-\-help\fR .RS 4 Show help options and exit\&. .RE .PP \fB\-v\fR, \fB\-\-verbose\fR .RS 4 Print debug information .RE .PP \fB\-\-forward\-fd=FD\fR .RS 4 Forward a file descriptor .RE .PP \fB\-\-clear\-env\fR .RS 4 Run with a clean environment .RE .PP \fB\-\-watch\-bus\fR .RS 4 Make the spawned command exit if we do .RE .PP \fB\-\-env=VAR=VALUE\fR .RS 4 Set an environment variable .RE .PP \fB\-\-latest\-version\fR .RS 4 Use the latest version of the refs that are used to set up the sandbox .RE .PP \fB\-\-no\-network\fR .RS 4 Run without network access .RE .PP \fB\-\-sandbox\fR .RS 4 Run fully sandboxed\&. .sp See the \fB\-\-sandbox\-expose\fR and \fB\-\-sandbox\-expose\-ro\fR options for selective file access\&. .RE .PP \fB\-\-sandbox\-expose=NAME\fR .RS 4 Expose read\-write access to a file in the sandbox\&. .sp 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 \fB\-\-sandbox\fR (otherwise the instance directory is accessible anyway)\&. .RE .PP \fB\-\-sandbox\-expose\-ro=NAME\fR .RS 4 Expose readonly access to a file in the sandbox\&. .sp 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 \fB\-\-sandbox\fR (otherwise the instance directory is accessible anyway)\&. .RE .PP \fB\-\-host\fR .RS 4 Run the command unsandboxed on the host\&. This requires access to the org\&.freedesktop\&.Flatpak D\-Bus interface .RE .PP \fB\-\-directory=DIR\fR .RS 4 The working directory in which to run the command\&. .sp Note that the given directory must exist in the sandbox or, when used in conjunction with \fB\-\-host\fR, on the host\&. .RE .SH "EXAMPLES" .PP \fB$ flatpak\-spawn ls /var/run\fR .SH "SEE ALSO" .PP \fBflatpak\fR(1)