1WHIPTAIL(1)                 General Commands Manual                WHIPTAIL(1)
2
3
4

NAME

6       whiptail - display dialog boxes from shell scripts
7

SYNOPSIS

9       whiptail  [  --title  title  ]  [ --backtitle backtitle ] [ --clear ] [
10       --default-item string ] [ --defaultno ] [  --fb  ]  [  --nocancel  ]  [
11       --yes-button  text ] [ --no-button text ] [ --ok-button text ] [ --can‐
12       cel-button text ] [ --noitem [ ] --output-fd fd ] [ --separate-output ]
13       [ --scrolltext ] [ --topleft ] box-options
14

DESCRIPTION

16       whiptail  is a program that will let you present a variety of questions
17       or display messages using dialog boxes from a shell script.  Currently,
18       these types of dialog boxes are implemented:
19
20       yes/no  box,  menu  box,  input  box,  message box, text box, info box,
21       checklist box, radiolist box gauge box, and password box.
22

OPTIONS

24       --clear
25              The screen will be cleared to  the  screen  attribute  on  exit.
26              This  doesn't  work  in  an xterm (and descendants) if alternate
27              screen switching is enabled, because in that case  slang  writes
28              to (and clears) an alternate screen.
29
30       --defaultno
31              The dialog box will open with the cursor over the No button.
32
33       --default-item string
34              Set  the default item in a menu box.  Normally the first item in
35              the box is the default.
36
37       --fb   Use full buttons. (By default, whiptail uses compact buttons).
38
39       --nocancel
40              The dialog box won't have a Cancel button.
41
42       --yes-button text
43              Set the text of the Yes button.
44
45       --no-button text
46              Set the text of the No button.
47
48       --ok-button text
49              Set the text of the Ok button.
50
51       --cancel-button text
52              Set the text of the Cancel button.
53
54       --noitem
55              The menu, checklist and  radiolist  widgets  will  display  tags
56              only, not the item strings.
57
58       --separate-output
59              For checklist widgets, output result one line at a time, with no
60              quoting.  This facilitates parsing by another program.
61
62       --output-fd fd
63              Direct output to  the  given  file  descriptor.   Most  whiptail
64              scripts write to standard error, but  error  messages  may  also
65              be written there, depending on your script.
66
67       --title title
68              Specifies a title string to be displayed at the top of the  dia‐
69              log box.
70
71       --backtitle backtitle
72              Specifies a backtitle string to be displayed on the backdrop, at
73              the top of the screen.
74
75       --scrolltext
76              Force the display of a vertical scrollbar.
77
78       --topleft
79              Put window in top-left corner.
80
81       Box Options
82
83       --yesno text height width
84              A yes/no dialog box of size height rows by width columns will be
85              displayed.  The string specified by text is displayed inside the
86              dialog box. If this string is too long to be fit in one line, it
87              will be automatically divided into multiple lines at appropriate
88              places. The text string may also contain the sub-string "\n"  or
89              newline  characters  `\n'  to  control line breaking explicitly.
90              This dialog box is useful for asking questions that require  the
91              user  to answer either yes or no.  The dialog box has a Yes but‐
92              ton and a No button, in which the user  can  switch  between  by
93              pressing the TAB key.
94
95       --msgbox text height width
96              A message box is very similar to a yes/no box.  The only differ‐
97              ence between a message box and a yes/no box is  that  a  message
98              box  has only a single OK button. You can use this dialog box to
99              display any message you like.  After reading  the  message,  the
100              user  can press the ENTER key so that whiptail will exit and the
101              calling shell script can continue its operation.
102
103       --infobox text height width
104              An info box is basically a message box.  However, in this  case,
105              whiptail  will  exit immediately after displaying the message to
106              the user. The screen is not cleared when whiptail exits, so that
107              the  message  will  remain on the screen until the calling shell
108              script clears it later. This is useful when you want  to  inform
109              the  user  that some operations are carrying on that may require
110              some time to finish.
111
112       --inputbox text height width [init]
113              An input box is useful when  you  want  to  ask  questions  that
114              require  the  user  to  input a string as the answer. If init is
115              supplied it is used to initialize the input string.  When input‐
116              ing  the string, the BACKSPACE key can be used to correct typing
117              errors. If the input string is longer than the width of the dia‐
118              log  box,  the  input field will be scrolled. On exit, the input
119              string will be printed on stderr.
120
121       --passwordbox text height width [init]
122              A password box is similar to an input box, except the  text  the
123              user  enters is not displayed. This is useful when prompting for
124              passwords or other sensitive information. Be aware that if  any‐
125              thing  is  passed  in "init", it will be visible in the system's
126              process table to casual snoopers. Also, it is very confusing  to
127              the  user  to  provide  them with a default password they cannot
128              see. For these reasons, using "init" is highly discouraged.
129
130       --textbox file height width
131              A text box lets you display the contents of a  text  file  in  a
132              dialog  box.  It is like a simple text file viewer. The user can
133              move through the  file  by  using  the  UP/DOWN,  PGUP/PGDN  and
134              HOME/END keys available on most keyboards.  If the lines are too
135              long to be displayed in the box, the LEFT/RIGHT keys can be used
136              to  scroll  the  text region horizontally. For more convenience,
137              forward and backward searching functions are also provided.
138
139       --menu text height width menu-height [ tag item ] ...
140              As its name suggests, a menu box is a dialog  box  that  can  be
141              used  to present a list of choices in the form of a menu for the
142              user to choose. Each menu entry consists of a tag string and  an
143              item  string.  The  tag gives the entry a name to distinguish it
144              from the other entries in the menu. The item is a short descrip‐
145              tion  of the option that the entry represents. The user can move
146              between the menu entries by pressing the UP/DOWN keys, the first
147              letter  of  the  tag as a hot-key. There are menu-height entries
148              displayed in the menu at one time, but the menu will be scrolled
149              if  there  are  more entries than that. When whiptail exits, the
150              tag of the chosen menu entry will be printed on stderr.
151
152       --checklist text height width list-height [ tag item status ] ...
153              A checklist box is similar to a menu box in that there are  mul‐
154              tiple  entries  presented in the form of a menu.  You can select
155              and deselect items using the  SPACE  key.   The  initial  on/off
156              state  of each entry is specified by status.  On exit, a list of
157              the tag strings of those entries that  are  turned  on  will  be
158              printed on stderr.
159
160
161       --radiolist text height width list-height  [ tag item status ] ...
162              A  radiolist  box is similar to a menu box.  The only difference
163              is that you can indicate which entry is currently  selected,  by
164              setting its status to on.
165
166
167       --gauge text height width percent
168              A  gauge  box displays a meter along the bottom of the box.  The
169              meter indicates a percentage.  New  percentages  are  read  from
170              standard  input,  one integer per line.  The meter is updated to
171              reflect each new percentage.  If stdin is XXX,  then  subsequent
172              lines  up  to  another XXX are used for a new prompt.  The gauge
173              exits when EOF is reached on stdin.
174
175

NOTES

177       whiptail interprets arguments starting with a dash "-" as  being  argu‐
178       ments.   To  avoid this, and start some text in, for example, a menubox
179       item, with a dash, whiptail honours the getopt convention of  accepting
180       the special argument "--" which means that all following arguments with
181       dashes are to be treated verbatim and not parsed as options.
182

DIAGNOSTICS

184       Exit status is 0 if whiptail is exited by pressing the Yes or  OK  but‐
185       ton,  and 1 if the No or Cancel button is pressed. Otherwise, if errors
186       occur inside whiptail or whiptail is exited by pressing  the  ESC  key,
187       the exit status is -1.
188

AUTHOR

190       Based on the man page for dialog(1) by:
191
192       Savio Lam (lam836@cs.cuhk.hk) - version 0.3
193
194       Stuart Herbert (S.Herbert@sheffield.ac.uk) - patch for version 0.4
195
196       Modifications for whiptail by:
197
198       Enrique Zanardi (ezanard@debian.org)
199
200       Alastair McKinstry (mckinstry@debian.org)
201
202
203
204Whiptail Version 0.52.5         31 January 2007                    WHIPTAIL(1)
Impressum