File: flatpak-spawn.xml

package info (click to toggle)
flatpak 1.16.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,020 kB
  • sloc: ansic: 101,028; xml: 11,453; sh: 4,871; python: 2,251; yacc: 1,236; makefile: 86; csh: 20
file content (215 lines) | stat: -rw-r--r-- 7,430 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">

<refentry id="flatpak-spawn">

    <refentryinfo>
        <title>flatpak spawn</title>
        <productname>flatpak</productname>

        <authorgroup>
            <author>
                <contrib>Developer</contrib>
                <firstname>Alexander</firstname>
                <surname>Larsson</surname>
                <email>alexl@redhat.com</email>
            </author>
        </authorgroup>
    </refentryinfo>

    <refmeta>
        <refentrytitle>flatpak spawn</refentrytitle>
        <manvolnum>1</manvolnum>
    </refmeta>

    <refnamediv>
        <refname>flatpak-spawn</refname>
        <refpurpose>Run commands in a sandbox</refpurpose>
    </refnamediv>

    <refsynopsisdiv>
            <cmdsynopsis>
                <command>flatpak-spawn</command>
                <arg choice="opt" rep="repeat">OPTION</arg>
                <arg choice="plain">COMMAND</arg>
                <arg choice="opt" rep="repeat">ARGUMENT</arg>
            </cmdsynopsis>
    </refsynopsisdiv>

    <refsect1>
        <title>Description</title>

        <para>
            Unlike other flatpak commands, <command>flatpak-spawn</command> is available
            to applications inside the sandbox. It runs <arg choice="plain">COMMAND</arg>
            outside the sandbox: either in another sandbox, or on the host.
        </para>

        <para>
            When called without <option>--host</option>, <command>flatpak-spawn</command>
            uses the Flatpak portal to create a copy of the sandbox it was called from,
            optionally using tighter permissions and optionally the latest version of the
            app and runtime (see <option>--latest-version</option>).
        </para>

    </refsect1>

    <refsect1>
        <title>Options</title>

        <para>The following options are understood:</para>

        <variablelist>
            <varlistentry>
                <term><option>-h</option></term>
                <term><option>--help</option></term>

                <listitem><para>
                    Show help options and exit.
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>-v</option></term>
                <term><option>--verbose</option></term>

                <listitem><para>
                    Print debug information
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--forward-fd=FD</option></term>

                <listitem><para>
                    Forward a file descriptor
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--clear-env</option></term>

                <listitem><para>
                    Run with a clean environment
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--watch-bus</option></term>

                <listitem><para>
                    Make the spawned command exit when <command>flatpak-spawn</command>
                    itself exits; notably, this occurs when its connection to the
                    session bus is closed.
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--env=VAR=VALUE</option></term>

                <listitem><para>
                    Set an environment variable
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--latest-version</option></term>

                <listitem><para>
                  Use the latest version of the refs that are used to set up the sandbox
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--no-network</option></term>

                <listitem><para>
                    Run without network access
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--sandbox</option></term>

                <listitem><para>
                  Run fully sandboxed. See the documentation for the <option>--sandbox</option>
                  option in <citerefentry><refentrytitle>flatpak-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>
                </para><para>
                  See the <option>--sandbox-expose</option> and
                  <option>--sandbox-expose-ro</option> options for selective file access.
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--sandbox-expose=NAME</option></term>

                <listitem><para>
                  Expose read-write access to a file in the sandbox.
                </para><para>
                  Note that absolute paths or subdirectories are not allowed.
                  The files must be in the <filename>sandbox</filename> subdirectory of
                  the instance directory (i.e. <filename>~/.var/app/$APP_ID/sandbox</filename>).
                </para><para>
                  This option is useful in combination with <option>--sandbox</option> (otherwise the
                  instance directory is accessible anyway).
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--sandbox-expose-ro=NAME</option></term>

                <listitem><para>
                  Expose readonly access to a file in the sandbox.
                </para><para>
                  Note that absolute paths or subdirectories are not allowed.
                  The files must be in the <filename>sandbox</filename> subdirectory of
                  the instance directory (i.e. <filename>~/.var/app/$APP_ID/sandbox</filename>).
                </para><para>
                  This option is useful in combination with <option>--sandbox</option> (otherwise the
                  instance directory is accessible anyway).
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--host</option></term>

                <listitem><para>
                  Run the command unsandboxed on the host. This requires access to
                  the org.freedesktop.Flatpak D-Bus interface.
                </para></listitem>
            </varlistentry>

            <varlistentry>
                <term><option>--directory=DIR</option></term>

                <listitem><para>
                  The working directory in which to run the command.
                </para><para>
                  Note that the given directory must exist in the sandbox or, when used in conjunction
                  with <option>--host</option>, on the host.
                </para></listitem>
            </varlistentry>

        </variablelist>
    </refsect1>

    <refsect1>
        <title>Examples</title>

        <para>
            <command>$ flatpak-spawn ls /var/run</command>
        </para>

    </refsect1>

    <refsect1>
        <title>See also</title>

        <para>
            <citerefentry><refentrytitle>flatpak</refentrytitle><manvolnum>1</manvolnum></citerefentry>
        </para>

    </refsect1>

</refentry>