- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
Podman to Desktop
A small Rust/egui application that discovers running rootless and rootful
Podman containers and turns them into Linux .desktop launchers. A launcher
opens the container's first exposed TCP port in your browser, for example:
http://localhost:13305/
Features
- Scans rootless Podman containers automatically.
- Scans rootful containers through the rootful Podman API socket or
passwordless
sudo. If neither is available, an Authorize rootful scan button usespkexec/polkit to authenticate. - Suggests the first published TCP port, falling back to the first exposed TCP port for host-network containers.
- Every container card lets you edit:
- the launcher name,
- the host port,
- the browser command.
- Test in browser checks whether the port accepts a TCP connection and then launches the browser.
- Create .desktop writes a desktop entry for that container. Create all launchers does the same for every valid container.
- Adds its own icon to the application menu on first launch, so the app can be reopened without a terminal.
- Uses egui's system theme preference, so the window follows the desktop's light/dark mode.
Requirements
- Linux with a desktop environment
- Rust (edition 2024, tested with Rust 1.99)
- Podman
xdg-openor another browser command- Optional: passwordless
sudoorpkexecfor rootful containers
Installation
Recommended: install with Cargo
cargo install --git https://git.schotty.com/andrew/podman-to-desktop.git
This builds the latest revision and installs the podman-to-desktop binary into
~/.cargo/bin, so make sure that directory is on your PATH.
From a local checkout
git clone https://git.schotty.com/andrew/podman-to-desktop.git
cd podman-to-desktop
cargo install --path .
Build and run without installing
cargo run --release
The compiled binary is target/release/podman-to-desktop.
After installing, launch it from your application menu or run:
podman-to-desktop
Where launchers go
Desktop files are written to:
$XDG_DATA_HOME/applications/
or, when XDG_DATA_HOME is unset:
~/.local/share/applications/
Names follow this pattern:
podman-rootless-<container-name>.desktop
podman-rootful-<container-name>.desktop
Existing files with the same name are overwritten.
Application menu icon
On first launch the app also adds its own entry to the application menu:
~/.local/share/applications/podman-to-desktop.desktop
or $XDG_DATA_HOME/applications/podman-to-desktop.desktop when
XDG_DATA_HOME is set. It appears as Podman to Desktop and launches the
executable that created it, so you can reopen the app without a terminal.
If you move or reinstall the binary, press Refresh next to Application menu icon in the app to point the entry at the new executable. If the entry was removed, the same row offers Add app icon.
Browser commands
The default is xdg-open, which uses the system default browser. You can use
any command, for example:
firefox
firefox --new-window
google-chrome --app=%u
Commands are split into arguments directly, without a shell. %u, %U, and
{} are replaced by the container URL; if none are present, the URL is appended
as the final argument.
Rootful scanning
Rootful discovery tries, in order:
podman --remote --url unix:///run/podman/podman.sock ps --format jsonsudo -n podman ps --format jsonpkexec podman ps --format json(only after you press the authorize button)
No blocking password prompt is ever opened during a normal rescan.
Tests
cargo test