---
name: "kwalletcli_getpin"
section: "1"
platform: "linux"
package: "kwalletcli"
version: "3.03-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/kwalletcli_getpin"
---

# kwalletcli\_getpin(1)

command line interface to pinentry

## NAME

**kwalletcli\_getpin** – command line interface to pinentry

## SYNOPSIS

**kwalletcli\_getpin** \[**Nq**\] \[**Nb** \| **Nm** \| **Np** *prompt*\] \[**NE** \| **Ne** *errortext*\]\
 \[**NN** *NoText*\] \[**Nt** *desctext*\] \[**NY** *YesText*\]

## DESCRIPTION

The **kwalletcli\_getpin** utility is a shell wrapper speaking to **pinentry** using the Assuan protocol. It will ask the user for a passphrase and print it, without any trailing newline, to standard output. There are options for asking a boolean question or displaying a message.

If PINENTRY is not empty but points to a nonNexisting or failing program, **pinentry** is not called. Instead, [xmessage(1)](/xmessage/1.md) is used for boolean queries and messages if DISPLAY is set; otherwise, **kwalletcli\_getpin** uses simple terminal I/O on GPG\_TTY using [stty(1)](/stty/1.md) to disable echo of terminal input for passphrase queries.

The options are as follows:

- **-b**

  Ask for a confirmation (boolean) instead of a passphrase.

- **-E**

  Unset a previously set error text.

- **-E** *errtxt*

  Set the error text to *errtxt*, displaying a dialogue box with a red X icon indicating that this is a retry question.

- **-m**

  Display a message (oneNbutton query) instead of asking.

- **-N** *NoText*

  Use *NoText* instead of **Cancel** for the text of the abort button, if any.

- **-p** *prompt*

  Set the small descriptive text shown in front of the input field (“the Prompt”) to *prompt*.

- **-q**

  Be more quiet.

- **-t** *desctxt*

  Set the descriptive text (the input challenge) to *desctxt*.

- **-Y** *YesText*

  Use *YesText* instead of **OK** for the text of the confirm button.

All input and output is assumed to be in UTFN8.

## RETURN VALUES

The **kwalletcli\_getpin** utility exits 0 on success, 1 if the passphrase input was cancelled by the user, or 1 if an error occurred. Confirmation (boolean) error codes are 0 for Yes, 1 for No, or 1 if an error occurred. Messages return 0 if an error occurred, 0 otherwise.

A summary of the error codes follows:

- 0

  Read password successfully. Boolean question returned Yes/OK.

- 1

  Boolean question returned No/Cancel.

- 2

  Wrong command line syntax.

- 3

  The process reading user input unexpectedly terminated or errored out.

- 4

  Unexpected result reading from pinentry.

- 5

  Unable to determine controlling tty, caller must set GPG\_TTY.

- 6

  Caught SIGHUP, SIGINT, SIGQUIT, SIGTRAP, SIGPIPE, or SIGTERM.

## ENVIRONMENT

- DISPLAY

  If not set, pass current terminal information to **pinentry**.

- GPG\_TERM

  Terminal type of the current tty. Defaults to the value of the environment variable TERM, or “vt100” if unset.

- GPG\_TTY

  The current terminal, determined by [tty(1)](/tty/1.md) if unset.

- LC\_CTYPE

  Passed to **pinentry**. Default: “en\_US.UTFN8”

- LC\_MESSAGES

  Passed to **pinentry**. Unset by default.

- PINENTRY

  The **pinentry** program to use. Default: “pinentry”

## SEE ALSO

gpgNagent(1), [kwalletcli(1)](/kwalletcli/1.md), pinentry(1), [stty(1)](/stty/1.md), [tset(1)](/tset/1.md), [tty(1)](/tty/1.md)

## AUTHORS

**kwalletcli\_getpin** was written by mirabilos  m@mirbsd.org  mostly for tarent solutions GmbH.

## CAVEATS

Some newer pinentry features, such as threeNbutton operation or setting the window title, are not supported yet.

## BUGS

Some **pinentry** programs may not support messages correctly and display them as boolean queries instead.

Some implementations display labels with the wrong charset.

Neither of these two problems is an issue in **kwalletcli\_getpin** but a bug of the backend implementation.
