distrobox-export
Integrate applications from distrobox into host system
TLDR
Export an app from the container to the host (the desktop entry/icon will show up in your host system's application list)
Export a binary from the container to the host
Export a binary from the container to the host (i.e.$HOME/.local/bin)
Export a service from the container to the host (--sudo will run the service as root inside the container)
Unexport/delete an exported application
SYNOPSIS
distrobox-export --container NAME { --app APPLICATION | --bin BINARY | --path PATH | --service SERVICE } [OPTIONS]
distrobox-export --container NAME --delete { --app APPLICATION | --bin BINARY | --service SERVICE }
Note: distrobox-export is typically a symlink to distrobox export.
PARAMETERS
--container NAME
Required. Specifies the name of the Distrobox container from which to export.
--app APPLICATION
Exports a GUI application by its .desktop file name (e.g., 'firefox').
--bin BINARY
Exports a command-line binary or executable (e.g., 'code', 'git').
--path PATH
Exports an entire directory path from the container, making its contents available on the host.
--service SERVICE
Exports a systemd user service from the container (e.g., 'podman.service').
--delete
Removes a previously exported application, binary, or service from the host system.
--export-label LABEL
Assigns a custom label or display name to the exported item.
--export-path PATH
Specifies an alternative directory on the host where the exported item's wrapper should be placed.
--export-wrappers-only
For --app and --bin exports, prevents the creation of .desktop files, only creating wrapper scripts.
-h, --help
Displays the command's help message and available options.
DESCRIPTION
distrobox-export is a pivotal command within the Distrobox ecosystem, designed to seamlessly integrate applications, binaries, and services installed inside a Distrobox container with the host system. It allows users to run GUI applications, command-line tools, or daemon services (like systemd user services) directly from their host desktop environment or terminal, as if they were natively installed. This command achieves this by creating necessary symbolic links, .desktop files, or wrapper scripts on the host, pointing to the corresponding elements within the specified container.
This powerful capability eliminates the need to manually enter the container to use its contents, providing an unparalleled level of dependency isolation while maintaining a native user experience. It's particularly useful for developers or users who need specific software versions, tools, or entire distribution environments without polluting their host system.
CAVEATS
Exported applications might still have minor visual inconsistencies if container and host themes are vastly different. Exported services might require careful management (e.g., enabling systemd user services). The --delete option only works for --app, --bin, and --service exports, not for --path exports. The container must be accessible or running for the export to function correctly.
DEFAULT EXPORT LOCATIONS
By default, --app exports typically create .desktop files in ~/.local/share/applications/. --bin exports create wrapper scripts in ~/.local/bin/, which should be in the user's PATH. --service exports usually place service files in ~/.config/systemd/user/.
HOW EXPORT WORKS
distrobox-export works by generating small wrapper scripts on the host system. These scripts ensure that when the exported application or binary is invoked, it's executed within the specified Distrobox container's environment, inheriting its dependencies and configurations, while still appearing to run directly on the host. For GUI applications, a .desktop file is also created to integrate with the host's desktop environment menus.
HISTORY
distrobox-export is a core component of the Distrobox project, which was initially created by Luca Di Maio. The project gained significant traction for its innovative approach to integrating containerized environments with host systems. The export functionality was integral to Distrobox's mission from its early stages, enabling users to leverage diverse Linux distributions and their package ecosystems without the overhead of virtual machines, making it a powerful tool for developers and power users alike.
SEE ALSO
distrobox(1), distrobox-create(1), distrobox-enter(1), distrobox-list(1), podman(1), docker(1)