Tente remover o && echo
do final da chamada para dmenu
:
#!/bin/bash
dmenu -p "$1" <&-
Isso deve desabilitar o eco do que o usuário está digitando em dmenu
. Este método é coberto neste post intitulado: Insira as senhas do dmenu .
$ cat dpass #! /bin/sh # shellcheck disable=2046 caller="$(ps -o comm= -p $(ps -o ppid= -p $$))" prompt="${1:-[$caller]}" promptfg=black promptbg=red hidden=white font="Liberation Sans-20:Bold" dmenu -p "$prompt" -fn "$font" \ -nf "$hidden" -nb "$hidden" -sf "$promptfg" -sb "$promptbg" <&-
- It sets the prompt (red part) to the calling application, if no args were passed. So the user always gets a prompt of some kind.
- It removes the trailing
&& echo
statement, so it works on other password handlers.