A modern, native Wayland pinentry implementation for GPG using egui.
Existing pinentry implementations (pinentry-gtk, pinentry-gnome3, pinentry-qt) often have issues on pure Wayland compositors like niri, sway, or Hyprland. This implementation provides a lightweight, native Wayland GUI that just works.
- Pure Wayland - No X11/DISPLAY dependencies
- Assuan protocol - Full compatibility with gpg-agent
- Minimal dependencies - Single Rust binary with egui + glow (OpenGL)
- Secure - Uses
secrecycrate for password zeroing in memory
cargo install pinentry-eguiThe binary will be installed to ~/.cargo/bin/pinentry-egui.
git clone https://github.com/dsociative/pinentry-egui.git
cd pinentry-egui
cargo build --release
# Binary will be at ./target/release/pinentry-eguiAdd to ~/.gnupg/gpg-agent.conf:
# If installed via cargo install:
pinentry-program ~/.cargo/bin/pinentry-egui
# Or if built from source:
# pinentry-program /path/to/pinentry-egui/target/release/pinentry-egui
Restart gpg-agent:
gpgconf --kill gpg-agent- Wayland compositor (niri, sway, Hyprland, etc.)
- OpenGL support
- Rust toolchain (for building from source)
Test the password dialog:
# If installed via cargo install:
echo -e "SETDESC Enter your password\nSETPROMPT Password:\nGETPIN\nBYE" | pinentry-egui
# Or from source:
echo -e "SETDESC Enter your password\nSETPROMPT Password:\nGETPIN\nBYE" | ./target/release/pinentry-eguiRun unit tests (from source):
cargo test- glow backend (OpenGL) - wgpu requires Vulkan which may not be available
- mpsc channel - Passes dialog results from egui App to protocol handler
- Percent-encoding - Proper Assuan protocol encoding/decoding
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.