1FLATPAK SPAWN(1) flatpak spawn FLATPAK SPAWN(1)
2
3
4
6 flatpak-spawn - Run commands in a sandbox
7
9 flatpak-spawn [OPTION...] COMMAND [ARGUMENT...]
10
12 Unlike other flatpak commands, flatpak-spawn is available to
13 applications inside the sandbox. It runs COMMAND outside the sandbox,
14 either in another sandbox, or on the host.
15
16 flatpak-spawn uses the Flatpak portal to create a copy the sandbox it
17 was called from, optionally using tighter permissions and the latest
18 version of the app and runtime.
19
21 The following options are understood:
22
23 -h, --help
24 Show help options and exit.
25
26 -v, --verbose
27 Print debug information
28
29 --forward-fd=FD
30 Forward a file descriptor
31
32 --clear-env
33 Run with a clean environment
34
35 --watch-bus
36 Make the spawned command exit if we do
37
38 --env=VAR=VALUE
39 Set an environment variable
40
41 --latest-version
42 Use the latest version of the refs that are used to set up the
43 sandbox
44
45 --no-network
46 Run without network access
47
48 --sandbox
49 Run fully sandboxed.
50
51 See the --sandbox-expose and --sandbox-expose-ro options for
52 selective file access.
53
54 --sandbox-expose=NAME
55 Expose read-write access to a file in the sandbox.
56
57 Note that absolute paths or subdirectories are not allowed. The
58 files must be in the sandbox subdirectory of the instance directory
59 (i.e. ~/.var/app/$APP_ID/sandbox).
60
61 This option is useful in combination with --sandbox (otherwise the
62 instance directory is accessible anyway).
63
64 --sandbox-expose-ro=NAME
65 Expose readonly access to a file in the sandbox.
66
67 Note that absolute paths or subdirectories are not allowed. The
68 files must be in the sandbox subdirectory of the instance directory
69 (i.e. ~/.var/app/$APP_ID/sandbox).
70
71 This option is useful in combination with --sandbox (otherwise the
72 instance directory is accessible anyway).
73
74 --host
75 Run the command unsandboxed on the host. This requires access to
76 the org.freedesktop.Flatpak D-Bus interface
77
78 --directory=DIR
79 The working directory in which to run the command.
80
81 Note that the given directory must exist in the sandbox or, when
82 used in conjunction with --host, on the host.
83
85 $ flatpak-spawn ls /var/run
86
88 flatpak(1)
89
90
91
92flatpak FLATPAK SPAWN(1)