| description | Export apps and binaries from podbox containers to your host desktop — .desktop files, launcher icons, binary shims, and MIME type handling. |
|---|
podbox can expose applications and binaries from inside the container to the host desktop — generating .desktop files, extracting icons, and creating shell shims.
| Command | Description |
|---|---|
podbox export app <name> |
Export a .desktop application |
podbox export bin <name> |
Create a binary shim in ~/.local/bin |
Applications and binaries are declared in the config under [integration.export]:
[integration.export]
apps = ["gedit", "nautilus"]
bins = ["rg", "gcc"]podbox export app extracts a desktop application from the container and makes it launchable from the host.
!!! info ""
The container must be running to export an app — podbox export app uses podman exec to read the .desktop file from inside the container. Start the container first if it is stopped.
-
Read the
.desktopfile from the container at/usr/share/applications/<name>.desktopviapodman exec. -
Rewrite the
Exec=line so launching the desktop entry runs throughpodbox execinside the container:Exec=gedit %Fbecomes:
Exec=podbox --container "myenv" exec -- gedit %FThe
--containerflag pins the target container. If you set an active context withpodbox use myenv, you can also runpodbox exec -- gedit %Fdirectly.All other keys (
Name=,Icon=,MimeType=, etc.) are preserved unchanged. -
Extract the icon by trying common paths inside the container:
/usr/share/icons/hicolor/{48,64,128,256}x{48,64,128,256}/apps/<name>.png /usr/share/icons/hicolor/scalable/apps/<name>.svgThe first match is copied to:
~/.local/share/icons/podbox/<container>/<name>.<ext> -
Write the
.desktopfile to:~/.local/share/applications/podbox-<container>-<name>.desktop -
Run
update-desktop-databaseon the applications directory (failure is non-fatal; a warning is printed).
MimeType= lines in the original .desktop file are preserved as-is. The host desktop environment registers the container app as a handler for those MIME types. When a user opens a file of that type, the rewritten Exec= line dispatches through podbox exec.
!!! info ""
MIME registration is handled entirely by the host desktop environment via the standard .desktop file mechanism — no additional configuration is needed.
podbox export bin creates a shell shim so a container binary appears on the host PATH.
A script is written to ~/.local/bin/<name>:
#!/bin/sh
exec podbox --container "<name>" run "<bin>" "$@"The --container flag ensures the shim always targets the right container regardless of the active context. For day-to-day use, podbox use <name> then podbox exec -- <bin> avoids the --container flag.
The shim is executable (chmod 755). If ~/.local/bin is on the user's PATH — which most distributions add by default — the binary appears as if installed locally.
Remove exported files for a container by running:
podbox export cleanThis removes:
- All
~/.local/share/applications/podbox-<container>-*.desktopfiles - The
~/.local/share/icons/podbox/<container>/directory tree - Any shims in
~/.local/bin/whose content references the container name
!!! warning ""
podbox remove does not automatically call unexport. Run podbox export commands or call unexport_all separately before removing the container.