Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ linux-id is FIDO token implementation for Linux that protects the token keys by

You can install linux-id by running the following commands:

```bash
```bash
git clone git@github.com:matejsmycka/linux-id.git
cd linux-id

Expand All @@ -25,7 +25,7 @@ curl -L https://github.com/matejsmycka/linux-id/releases/download/v0.1.1/linux-i
chmod +x linux-id
```

## Test
## Test

You can test the installation by visiting [https://demo.yubico.com/webauthn-technical/registration](https://demo.yubico.com/webauthn-technical/registration) and follow fido token enroll and authentication steps.

Expand Down Expand Up @@ -83,6 +83,17 @@ On an authentication request, linux-id will attempt to load the primary key by i
linux-id requires `pinentry` to be available on the system. If you have gpg installed you most likely already have `pinentry`.
You will need `go` with version 1.22 or higher (only for compiling).

## Known Issues

By default, linux-id tries to find an appropriate pinentry GUI client by checking for various common pinentry implementations. If you encounter issues with pinentry dialogs not appearing or the automatically selected pinentry doesn't work well in your environment, you can specify a specific pinentry binary using the `PINENTRY_PATH` environment variable:

```bash
# Set a specific pinentry program
PINENTRY_PATH=/usr/bin/pinentry-qt5 ./linux-id
```

You can typically find installed pinentry programs by running `ls /usr/bin/pinentry*`.

## Contributing

Please feel free to open an issue or PR if you have any suggestions or improvements.
7 changes: 7 additions & 0 deletions pinentry/pinentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package pinentry
import (
"errors"
"log"
"os"
"os/exec"
"sync"
"time"
Expand Down Expand Up @@ -141,6 +142,12 @@ func (pe *Pinentry) prompt(req *request, prompt string) {
}

func FindPinentryGUIPath() string {
if path := os.Getenv("PINENTRY_PATH"); path != "" {
if p, _ := exec.LookPath(path); p != "" {
return p
}
}

candidates := []string{
"pinentry-gnome3",
"pinentry-qt5",
Expand Down