2022-06-22 08:47:30 +02:00
|
|
|
<!-- markdownlint-disable MD010 MD036 -->
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
# NAME
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
distrobox-export
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
# DESCRIPTION
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2023-03-26 16:56:04 +02:00
|
|
|
**Application and binary exporting**
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2023-03-26 16:56:04 +02:00
|
|
|
distrobox-export takes care of exporting an app or a binary from the container
|
2022-06-22 08:47:30 +02:00
|
|
|
to the host.
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
The exported app will be easily available in your normal launcher and it will
|
|
|
|
|
automatically be launched from the container it is exported from.
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
# SYNOPSIS
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
**distrobox-export**
|
2022-01-13 19:23:12 +01:00
|
|
|
|
2024-06-28 16:56:33 +02:00
|
|
|
--app/-a: name of the application to export or absolute path to desktopfile to export
|
2022-01-13 19:23:12 +01:00
|
|
|
--bin/-b: absolute path of the binary to export
|
2024-02-19 19:05:25 +01:00
|
|
|
--list-apps: list applications exported from this container
|
|
|
|
|
--list-binaries list binaries exported from this container, use -ep to specify custom paths to search
|
2023-03-26 16:56:04 +02:00
|
|
|
--delete/-d: delete exported application or binary
|
2022-01-13 19:23:12 +01:00
|
|
|
--export-label/-el: label to add to exported application name.
|
2023-09-26 21:07:03 +02:00
|
|
|
Use "none" to disable.
|
2022-01-13 19:23:12 +01:00
|
|
|
Defaults to (on \$container_name)
|
|
|
|
|
--export-path/-ep: path where to export the binary
|
|
|
|
|
--extra-flags/-ef: extra flags to add to the command
|
2026-06-25 12:29:31 +02:00
|
|
|
--enter-flags/-nf: flags to add to `distrobox enter`
|
2022-07-10 17:24:50 -03:00
|
|
|
--sudo/-S: specify if the exported item should be run as sudo
|
2022-01-13 19:23:12 +01:00
|
|
|
--help/-h: show this message
|
|
|
|
|
--verbose/-v: show more verbosity
|
|
|
|
|
--version/-V: show version
|
|
|
|
|
|
2023-03-26 16:56:04 +02:00
|
|
|
You may want to install graphical applications or CLI tools in your distrobox.
|
2022-01-13 19:23:12 +01:00
|
|
|
Using `distrobox-export` from **inside** the container will let you use them from the host itself.
|
|
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
# EXAMPLES
|
|
|
|
|
|
|
|
|
|
distrobox-export --app mpv [--extra-flags "flags"] [--delete] [--sudo]
|
2023-06-13 22:41:06 +02:00
|
|
|
distrobox-export --bin /path/to/bin [--export-path ~/.local/bin] [--extra-flags "flags"] [--delete] [--sudo]
|
2022-06-22 08:47:30 +02:00
|
|
|
|
|
|
|
|
**App export example**
|
2022-01-13 19:23:12 +01:00
|
|
|
|
|
|
|
|
distrobox-export --app abiword
|
|
|
|
|
|
|
|
|
|
This tool will simply copy the original `.desktop` files along with needed icons,
|
2026-06-25 12:29:31 +02:00
|
|
|
add the prefix `/usr/local/bin/distrobox enter -n distrobox_name -e ...` to the commands to run, and
|
2022-01-13 19:23:12 +01:00
|
|
|
save them in your home to be used directly from the host as a normal app.
|
|
|
|
|
|
2024-06-28 16:56:33 +02:00
|
|
|
distrobox-export --app /opt/application/my-app.desktop
|
|
|
|
|
|
|
|
|
|
This will skip searching for the desktopfile in canonical paths, and just use the provided file path.
|
|
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
**Binary export example**
|
2022-01-13 19:23:12 +01:00
|
|
|
|
|
|
|
|
distrobox-export --bin /usr/bin/code --extra-flags "--foreground" --export-path $HOME/.local/bin
|
|
|
|
|
|
2022-04-05 18:21:37 +02:00
|
|
|
In the case of exporting binaries, you will have to specify **where** to export it
|
|
|
|
|
(`--export-path`) and the tool will create a little wrapper script that will
|
2026-06-25 12:29:31 +02:00
|
|
|
`distrobox enter -e` from the host, the desired binary.
|
2022-01-13 19:23:12 +01:00
|
|
|
This can be handy with the use of `direnv` to have different versions of the same binary based on
|
|
|
|
|
your `env` or project.
|
|
|
|
|
|
2022-06-22 08:47:30 +02:00
|
|
|
The exported binaries will be exported in the "--export-path" of choice as a wrapper
|
|
|
|
|
script that acts naturally both on the host and in the container.
|
|
|
|
|
|
|
|
|
|
**Additional flags**
|
|
|
|
|
|
|
|
|
|
You can specify additional flags to add to the command, for example if you want
|
|
|
|
|
to export an electron app, you could add the "--foreground" flag to the command:
|
|
|
|
|
|
|
|
|
|
distrobox-export --app atom --extra-flags "--foreground"
|
|
|
|
|
distrobox-export --bin /usr/bin/vim --export-path ~/.local/bin --extra-flags "-p"
|
|
|
|
|
|
2023-03-26 16:56:04 +02:00
|
|
|
This works for binaries and apps.
|
|
|
|
|
Extra flags are only used then the exported app or binary is used from
|
2022-06-22 08:47:30 +02:00
|
|
|
the host, using them inside the container will not include them.
|
|
|
|
|
|
|
|
|
|
**Unexport**
|
|
|
|
|
|
2023-03-26 16:56:04 +02:00
|
|
|
The option "--delete" will un-export an app or binary
|
2022-06-22 08:47:30 +02:00
|
|
|
|
|
|
|
|
distrobox-export --app atom --delete
|
|
|
|
|
distrobox-export --bin /usr/bin/vim --export-path ~/.local/bin --delete
|
|
|
|
|
|
|
|
|
|
**Run as root in the container**
|
|
|
|
|
|
|
|
|
|
The option "--sudo" will launch the exported item as root inside the distrobox.
|
|
|
|
|
|
|
|
|
|
**Notes**
|
|
|
|
|
|
2023-03-26 16:56:04 +02:00
|
|
|
Note you can use --app OR --bin but not together.
|
2022-06-22 08:47:30 +02:00
|
|
|
|
2022-01-13 19:23:12 +01:00
|
|
|

|
|
|
|
|
|
|
|
|
|
NOTE: some electron apps such as vscode and atom need additional flags to work from inside the
|
|
|
|
|
container, use the `--extra-flags` option to provide a series of flags, for example:
|
|
|
|
|
|
|
|
|
|
`distrobox-export --app atom --extra-flags "--foreground"`
|