2 releases
| 0.1.1 | Feb 14, 2026 |
|---|---|
| 0.1.0 | Feb 14, 2026 |
#393 in GUI
35KB
373 lines
pinentry-egui
A modern, native Wayland pinentry implementation for GPG using egui.
Why?
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.
Features
- 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
Installation
From crates.io (recommended)
cargo install pinentry-egui
The binary will be installed to ~/.cargo/bin/pinentry-egui.
From source
git clone https://github.com/dsociative/pinentry-egui.git
cd pinentry-egui
cargo build --release
# Binary will be at ./target/release/pinentry-egui
Configure GPG
Add 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
Requirements
- Wayland compositor (niri, sway, Hyprland, etc.)
- OpenGL support
- Rust toolchain (for building from source)
Testing
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-egui
Run unit tests (from source):
cargo test
Implementation Details
- 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
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Contribution
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.
Dependencies
~14–59MB
~850K SLoC