| Crates.io | badged |
| lib.rs | badged |
| version | 0.1.0 |
| created_at | 2025-12-12 16:35:44.312178+00 |
| updated_at | 2025-12-12 16:35:44.312178+00 |
| description | A polkit authentication agent for Linux window managers |
| homepage | https://github.com/jfernandez/badged |
| repository | https://github.com/jfernandez/badged |
| max_upload_size | |
| id | 1981821 |
| size | 64,020 |
A polkit authentication agent for Linux window managers.
pam_fprintd out of the box. The password field only appears when PAM explicitly requests it.Polkit handles authorization on Linux. When an app needs elevated privileges, polkit prompts you for your password or fingerprint to verify your identity. GNOME, KDE, and other desktop environments ship their own polkit agents, but if you're running a window manager like sway, i3, or Hyprland, you need to bring your own.
The target system needs:
polkit-agent-helper-1 which handles PAM authenticationD-Bus is required but is present on virtually all Linux systems.
| Distro | Package |
|---|---|
| Fedora | gtk4 polkit |
| Debian/Ubuntu | libgtk-4-1 policykit-1 |
| Arch | gtk4 polkit |
Download the latest binary from Releases and place it in your $PATH.
Requires GTK4 and D-Bus development libraries:
| Distro | Packages |
|---|---|
| Fedora | gtk4-devel dbus-devel |
| Debian/Ubuntu | libgtk-4-dev libdbus-1-dev |
| Arch | gtk4 dbus |
cargo install badged
Or clone and build:
git clone https://github.com/jfernandez/badged
cd badged
cargo install --path .
Run badged when your session starts. It registers with polkit over D-Bus and waits for authentication requests.
For Hyprland, add to ~/.config/hypr/hyprland.conf (or autostart.conf if you split your config):
exec-once = badged
When an application requests elevated privileges, polkit looks for a registered authentication agent and calls its BeginAuthentication method over D-Bus. badged shows a dialog, spawns the standard polkit-agent-helper-1 binary (provided by your distro), and relays credentials through it. The helper handles all PAM interaction, so badged never runs as root and never handles passwords directly. It just pipes them to the helper's stdin.