linuxbashdialogncurses

Linux Dialog Input Box Problems


I'm having a issue with the input-box on dialog. It is overlaying the text that was typed when enter is pressed. This happens wherever the cursor focus is when enter is pressed.

This is the code im using it is bash

OUTPUT="INPUT.txt"
>$OUTPUT

dialog --stdout --title "Client Name" \
--backtitle "Setup" \
--inputbox "Enter The Client Name" 0 0 2>$OUTPUT
CLIENTNAME=$(<$OUTPUT)
rm $OUTPUT

enter image description here


Solution

  • You're using the --stdout option, but redirecting STDERR instead of STDOUT.

    Change

    --inputbox "Enter The Client Name" 0 0 2>$OUTPUT
    

    To

    --inputbox "Enter The Client Name" 0 0 >$OUTPUT
    

    That will fix it when using --stdout.