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

NOTES

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

DIAGNOSTICS

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

AUTHOR

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