1DISTROBOX-EXPORT(1) User Manual DISTROBOX-EXPORT(1)
2
3
4
6 distrobox-export takes care of exporting an app a binary or a service
7 from the container to the host.
8
9 The exported app will be easily available in your normal launcher and
10 it will automatically be launched from the container it is exported
11 from.
12
13 The exported services will be available in the host’s user’s systemd
14 session, so
15
16 systemctl --user status exported_service_name
17
18 will show the status of the service exported.
19
20 The exported binaries will be exported in the “–export-path” of choice
21 as a wrapper script that acts naturally both on the host and in the
22 container. Note that “–export-path” is NOT OPTIONAL, you have to ex‐
23 plicitly set it.
24
25 You can specify additional flags to add to the command, for example if
26 you want to export an electron app, you could add the “–foreground”
27 flag to the command:
28
29 distrobox-export --app atom --extra-flags "--foreground"
30 distrobox-export --bin /usr/bin/vim --export-path ~/.local/bin --extra-flags "-p"
31 distrobox-export --service syncthing --extra-flags "-allow-newer-config"
32
33 This works for services, binaries, and apps. Extra flags are only used
34 then the exported app, binary, or service is used from the host, using
35 them inside the container will not include them.
36
37 The option “–delete” will un-export an app, binary, or service.
38
39 distrobox-export --app atom --delete
40 distrobox-export --bin /usr/bin/vim --export-path ~/.local/bin --delete
41 distrobox-export --service syncthing --delete
42 distrobox-export --service nginx --delete
43
44 The option “–sudo” will launch the exported item as root inside the
45 distrobox.
46
47 Note you can use –app OR –bin OR –service but not together.
48
49 distrobox-export --service nginx --sudo
50
51 Usage:
52
53 distrobox-export --app mpv [--extra-flags "flags"] [--delete] [--sudo]
54 distrobox-export --service syncthing [--extra-flags "flags"] [--delete] [--sudo]
55 distrobox-export --bin /path/to/bin --export-path ~/.local/bin [--extra-flags "flags"] [--delete] [--sudo]
56
57 Options:
58
59 --app/-a: name of the application to export
60 --bin/-b: absolute path of the binary to export
61 --service/-s: name of the service to export
62 --delete/-d: delete exported application or service
63 --export-label/-el: label to add to exported application name.
64 Defaults to (on \$container_name)
65 --export-path/-ep: path where to export the binary
66 --extra-flags/-ef: extra flags to add to the command
67 --sudo/-S: specify if the exported item should be ran as sudo
68 --help/-h: show this message
69 --verbose/-v: show more verbosity
70 --version/-V: show version
71
72 You may want to install graphical applications or user services in your
73 distrobox. Using distrobox-export from inside the container will let
74 you use them from the host itself.
75
76 App export example:
77
78 distrobox-export --app abiword
79
80 This tool will simply copy the original .desktop files along with need‐
81 ed icons, add the prefix /usr/local/bin/distrobox-enter -n dis‐
82 trobox_name -e ... to the commands to run, and save them in your home
83 to be used directly from the host as a normal app.
84
85 Service export example:
86
87 distrobox-export --service syncthing --extra-flags "--allow-newer-config"
88 distrobox-export --service nginx --sudo
89
90 For services, it will similarly export the systemd unit inside the con‐
91 tainer to a systemctl --user service, prefixing the various ExecStart
92 ExecStartPre ExecStartPost ExecReload ExecStop ExecStopPost with the
93 distrobox-enter command prefix.
94
95 Binary export example:
96
97 distrobox-export --bin /usr/bin/code --extra-flags "--foreground" --export-path $HOME/.local/bin
98
99 In the case of exporting binaries, you will have to specify where to
100 export it (--export-path) and the tool will create a little wrapper
101 script that will distrobox-enter -e from the host, the desired binary.
102 This can be handy with the use of direnv to have different versions of
103 the same binary based on your env or project.
104
105 [IMAGE: app-export (https://user-images.githubusercon‐
106 tent.com/598882/144294795-c7785620-bf68-4d1b-b251-1e1f0a32a08d.png)]
107
108 [IMAGE: service-export (https://user-images.githubusercon‐
109 tent.com/598882/144294314-29a8921f-4511-453d-bf8e-d0d1e336db91.png)]
110
111 NOTE: some electron apps such as vscode and atom need additional flags
112 to work from inside the container, use the --extra-flags option to pro‐
113 vide a series of flags, for example:
114
115 distrobox-export --app atom --extra-flags "--foreground"
116
117
118
119Distrobox Jun 2022 DISTROBOX-EXPORT(1)