KWALLETCLI_GETPIN(1)

πŸ’– KWALLETCLI_GETPIN πŸ’–

okay bestie, so this one's from the General Commands Manual section, and it's literally called kwalletcli_getpin β€” say that three times fast, I dare you. πŸŽ€


✨ NAME ✨

kwalletcli_getpin β€” a command line interface to pinentry, no cap 🫢


🌸 SYNOPSIS 🌸

kwalletcli_getpin [-q] [-b | -m | -p prompt] [-E | -e errortext]
                  [-N NoText] [-t desctext] [-Y YesText]

πŸ¦‹ DESCRIPTION πŸ¦‹

so kwalletcli_getpin is a lil shell wrapper that talks to pinentry using the Assuan protocol, which is giving very much backstage-pass energy ngl. it asks the user for a passphrase and then prints it to standard output β€” without any trailing newline, okay, that part matters, don't come for me. πŸ’…

and it's not just passphrases, bestie. there are options for asking a boolean question or just displaying a message. versatile icon behaviour, honestly. πŸ‘‘

now here's the tea β˜• β€” if PINENTRY is not empty but points to a non-existing or failing program, then pinentry is not called. instead:

  • xmessage(1) gets used for boolean queries and messages, but only if DISPLAY is set
  • otherwise kwalletcli_getpin falls back to simple terminal I/O on GPG_TTY, using stty(1) to turn off echo of terminal input for passphrase queries πŸ”‡

The options are as follows:


πŸ’… OPTIONS πŸ’…

  • -b β€” ask for a confirmation (boolean) instead of a passphrase. yes/no vibes only. πŸ“
  • -E β€” unset a previously set error text. bye bye error text πŸ‘‹
  • -E errtxt β€” set the error text to errtxt, and it pops a dialogue box with a red X icon indicating that this is a retry question. dramatic? yes. necessary? also yes. 😭
  • -m β€” display a message (one-button query) instead of asking. just a lil announcement, main character energy πŸ“’
  • -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 (aka β€œthe Prompt”) to prompt. ✍️
  • -q β€” be more quiet. shhh 🀫
  • -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 UTF-8. periodt. πŸ’–


🌈 RETURN VALUES 🌈

kwalletcli_getpin 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. bestie what did you type πŸ’€
  • 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) if unset.
  • LC_CTYPE β€” Passed to pinentry. Default: β€œen_US.UTF-8”
  • LC_MESSAGES β€” Passed to pinentry. Unset by default.
  • PINENTRY β€” The pinentry program to use. Default: β€œpinentry”

πŸ‘€ SEE ALSO πŸ‘€

gpg-agent(1), kwalletcli(1), pinentry(1), stty(1), tset(1), tty(1)


🫢 AUTHORS 🫢

kwalletcli_getpin was written by mirabilos <m@mirbsd.org> mostly for tarent solutions GmbH. iconic collaboration fr fr πŸ’œ


⚠️ CAVEATS ⚠️

Some newer pinentry features, such as three-button operation or setting the window title, are not supported yet. it's giving "coming soon to a terminal near you", but for now, no. πŸ™…β™€οΈ


πŸ’€ BUGS πŸ’€

  • Some pinentry programs may not support messages correctly and display them as boolean queries instead. messy. 😭
  • 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. so like… not our fault, bestie, don't @ us. πŸ’…

okay and that's the whole page!! πŸŽ€ this version shipped in Debian, dated November 19, 2020 β€” so when you're reading this in the group chat at 2am, just know it's the real, official, vintage-certified manual page. slay, stay safe, and always set your GPG_TTY. πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from