Charlie
Charlie

Reputation: 2291

How to display infobox in whiptail?

Why does this code not work in Bash?

whiptail --infobox "My Text" 0 0

The manual states:

whiptail --infobox text height width

So what is wrong?

Upvotes: 7

Views: 5609

Answers (2)

wanpelaman
wanpelaman

Reputation: 81

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

Upvotes: 7

jcharaoui
jcharaoui

Reputation: 221

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.

Upvotes: 9

Related Questions