Skip to content

dsociative/pinentry-egui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pinentry-egui

Crates.io Downloads License

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 secrecy crate 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:

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.

About

A modern, native Wayland pinentry implementation for GPG using egui.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages