diff --git a/extras/translations/de.po b/extras/translations/de.po index a68c082c..d2607947 100644 --- a/extras/translations/de.po +++ b/extras/translations/de.po @@ -96,8 +96,8 @@ msgstr "Vorgang abgebrochen." #: tomb:Safety functions:ask_password:536 #, fuzzy -msgid "Cannot find any pinentry-curses and no DISPLAY detected." -msgstr "Kann 'pinentry-curses' nicht finden und es kein DISPLAY gefunden." +msgid "Cannot find any pinentry and no DISPLAY detected." +msgstr "Kann 'pinentry' nicht finden und es kein DISPLAY gefunden." #: tomb:Safety functions:ask_password:550 msgid "Pinentry error: ::1 error::" diff --git a/extras/translations/es.po b/extras/translations/es.po index bf911ed6..a0624ec8 100644 --- a/extras/translations/es.po +++ b/extras/translations/es.po @@ -94,8 +94,8 @@ msgstr "Operación abortada." #: tomb:Safety functions:ask_password:536 #, fuzzy -msgid "Cannot find any pinentry-curses and no DISPLAY detected." -msgstr "No se puede encontrar pinentry-curses, y no se ha detectado DISPLAY." +msgid "Cannot find any pinentry and no DISPLAY detected." +msgstr "No se puede encontrar pinentry, y no se ha detectado DISPLAY." #: tomb:Safety functions:ask_password:550 msgid "Pinentry error: ::1 error::" diff --git a/extras/translations/fr.po b/extras/translations/fr.po index 25890863..87bcf22c 100644 --- a/extras/translations/fr.po +++ b/extras/translations/fr.po @@ -100,9 +100,9 @@ msgstr "L'opération est interrompue." #: tomb:Safety functions:ask_password:536 #, fuzzy -msgid "Cannot find any pinentry-curses and no DISPLAY detected." +msgid "Cannot find any pinentry and no DISPLAY detected." msgstr "" -"Impossible de trouver pinentry-curses et aucun DISPLAY n'a été détecté." +"Impossible de trouver pinentry et aucun DISPLAY n'a été détecté." #: tomb:Safety functions:ask_password:550 msgid "Pinentry error: ::1 error::" diff --git a/extras/translations/it.po b/extras/translations/it.po index 76b06048..3b323d60 100644 --- a/extras/translations/it.po +++ b/extras/translations/it.po @@ -89,8 +89,8 @@ msgstr "Operazione annullata." #: tomb:Safety functions:ask_password:536 #, fuzzy -msgid "Cannot find any pinentry-curses and no DISPLAY detected." -msgstr "Impossibile trovare pinentry-curses e nessun DISPLAY rilevato." +msgid "Cannot find any pinentry and no DISPLAY detected." +msgstr "Impossibile trovare pinentry e nessun DISPLAY rilevato." #: tomb:Safety functions:ask_password:550 msgid "Pinentry error: ::1 error::" diff --git a/extras/translations/pt_BR.po b/extras/translations/pt_BR.po index 6c191a01..f1d0df65 100644 --- a/extras/translations/pt_BR.po +++ b/extras/translations/pt_BR.po @@ -91,9 +91,9 @@ msgid "Operation aborted." msgstr "Operação abortada." #: tomb:Safety functions:ask_password:536 -msgid "Cannot find any pinentry-curses and no DISPLAY detected." +msgid "Cannot find any pinentry and no DISPLAY detected." msgstr "" -"Não foi possível encontrar qualquer pinentry-curses e nenhum DISPLAY foi " +"Não foi possível encontrar qualquer pinentry e nenhum DISPLAY foi " "detectado." #: tomb:Safety functions:ask_password:550 diff --git a/extras/translations/ru.po b/extras/translations/ru.po index c7007f14..736cf95c 100644 --- a/extras/translations/ru.po +++ b/extras/translations/ru.po @@ -90,8 +90,8 @@ msgstr "Операция отменена." #: tomb:Safety functions:ask_password:536 #, fuzzy -msgid "Cannot find any pinentry-curses and no DISPLAY detected." -msgstr "Не могу найти pinentry-curses и не задан DISPLAY." +msgid "Cannot find any pinentry and no DISPLAY detected." +msgstr "Не могу найти pinentry и не задан DISPLAY." #: tomb:Safety functions:ask_password:550 msgid "Pinentry error: ::1 error::" diff --git a/extras/translations/sv.po b/extras/translations/sv.po index 148ad3ba..4e3e9a03 100644 --- a/extras/translations/sv.po +++ b/extras/translations/sv.po @@ -86,8 +86,8 @@ msgstr "Åtgärden är avbruten." #: tomb:Safety functions:ask_password:536 #, fuzzy -msgid "Cannot find any pinentry-curses and no DISPLAY detected." -msgstr "Kan ej hitta pinentry-curses och ingen DISPLAY detekterad." +msgid "Cannot find any pinentry and no DISPLAY detected." +msgstr "Kan ej hitta pinentry och ingen DISPLAY detekterad." #: tomb:Safety functions:ask_password:550 msgid "Pinentry error: ::1 error::" diff --git a/extras/translations/tomb.pot b/extras/translations/tomb.pot index a0192243..baa252dc 100644 --- a/extras/translations/tomb.pot +++ b/extras/translations/tomb.pot @@ -86,7 +86,7 @@ msgid "Operation aborted." msgstr "" #: tomb:Safety functions:ask_password:536 -msgid "Cannot find any pinentry-curses and no DISPLAY detected." +msgid "Cannot find any pinentry and no DISPLAY detected." msgstr "" #: tomb:Safety functions:ask_password:550 diff --git a/extras/translations/zh_Hans.po b/extras/translations/zh_Hans.po index 60d0a165..86c741f4 100644 --- a/extras/translations/zh_Hans.po +++ b/extras/translations/zh_Hans.po @@ -81,7 +81,7 @@ msgid "Operation aborted." msgstr "" #: tomb:Safety functions:ask_password:536 -msgid "Cannot find any pinentry-curses and no DISPLAY detected." +msgid "Cannot find any pinentry and no DISPLAY detected." msgstr "" #: tomb:Safety functions:ask_password:550 diff --git a/tomb b/tomb index 16603f7f..d9380b0d 100755 --- a/tomb +++ b/tomb @@ -525,15 +525,22 @@ ask_password() { fi if [[ $pass_asked == 0 ]]; then _verbose "no display detected" - _is_found "pinentry-curses" && { + if _is_found "pinentry-curses"; then _verbose "using pinentry-curses with no display" output=$(pinentry_assuan_getpass | pinentry-curses) pass_asked=1 - } + elif _is_found "pinentry-tty"; then + _verbose "using pinentry-tty with no display" + output=$(pinentry_assuan_getpass | pinentry-tty) + pass_asked=1 + else + # TODO: fallback to asking password using read + _failure "Cannot find any pinentry and no DISPLAY detected." + fi fi [[ $pass_asked == 0 ]] && - _failure "Cannot find any pinentry-curses and no DISPLAY detected." + _failure "Cannot find any pinentry and no DISPLAY detected." # parse the pinentry output local pinentry_error @@ -987,11 +994,16 @@ _list_optional_tools() { _ensure_dependencies() { # Check for required programs - for req in cryptsetup pinentry sudo gpg mkfs.ext4 e2fsck; do + for req in cryptsetup sudo gpg mkfs.ext4 e2fsck; do command -v $req 1>/dev/null 2>/dev/null || { _failure "Missing required dependency ::1 command::. Please install it." $req; } done - + # Check for pinentry or at least pinentry-tty (which has no alias) + if ! command -v pinentry 1>/dev/null 2>/dev/null; then + if ! command -v pinentry-tty 1>/dev/null 2>/dev/null; then + _failure "Missing required dependency ::1 command::. Please install it." pinentry + fi + fi # Ensure system binaries are available in the PATH path+=(/sbin /usr/sbin) # zsh magic