Why does this code not work in Bash?
whiptail --infobox \"My Text\" 0 0
The manual states:
whiptail --infobox text height w
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
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
.