How to display infobox in whiptail?

前端 未结 2 1771
北恋
北恋 2021-01-18 08:38

Why does this code not work in Bash?

whiptail --infobox \"My Text\" 0 0

The manual states:

whiptail --infobox text height w         


        
相关标签:
2条回答
  • 2021-01-18 09:08

    Definitely looks like a bug.

    I think it must be saving the screen, displaying the box, but then clearing the screen again (like "less <filename>") - you can see output if you pipe it through something like "cat -v".

    I think vt220 is pretty similar to xterm, so a workaround is:

    TERM=vt220 whiptail --infobox "My Text" 0 0
    
    0 讨论(0)
  • 2021-01-18 09:26

    Due to a bug, the --infobox option in whiptail doesn't work in an xterm (ie. gnome-terminal). It does work on a regular console, however.

    This seems to be a long-standing bug, which has been brushed off as non-reproducible when it was reported.

    More recently it has again been reported in Launchpad.

    If you need a working --infobox under xterm, you can use dialog.

    0 讨论(0)
提交回复
热议问题