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

NAME

6       dialog - display dialog boxes from shell scripts
7

SYNOPSIS

9       dialog --clear
10       dialog --create-rc file
11       dialog --print-maxsize
12       dialog common-options box-options
13

DESCRIPTION

15       Dialog is a program that will let you to present a variety of questions
16       or display messages using dialog boxes  from  a  shell  script.   These
17       types  of  dialog boxes are implemented (though not all are necessarily
18       compiled into dialog):
19
20              calendar, checklist, dselect, editbox, form, fselect, gauge,
21              infobox, inputbox, inputmenu, menu, mixedform, mixedgauge,
22              msgbox (message), passwordbox, passwordform, pause, progressbox,
23              radiolist, tailbox, tailboxbg, textbox, timebox, and yesno
24              (yes/no).
25
26       You can put more than one dialog box into a script:
27
28       -    Use the "--and-widget" token to force Dialog  to  proceed  to  the
29            next dialog unless you have pressed ESC to cancel, or
30
31       -    Simply  add  the  tokens  for the next dialog box, making a chain.
32            Dialog stops chaining when the return code from a dialog is nonze‐
33            ro, e.g., Cancel or No (see DIAGNOSTICS).
34
35       Some  widgets,  e.g.,  checklist,  will  write text to dialog's output.
36       Normally that is the standard error, but there are options for changing
37       this:  "--output-fd", "--stderr" and "--stdout".  No text is written if
38       the Cancel button (or ESC) is pressed; dialog exits immediately in that
39       case.
40

OPTIONS

42       All  options  begin  with  "--"  (two ASCII hyphens, for the benefit of
43       those using systems with deranged locale support).
44
45       A "--" by itself is used as an escape, i.e., the next token on the com‐
46       mand-line is not treated as an option.
47              dialog --title -- --Not an option
48
49       The "--args" option tells dialog to list the command-line parameters to
50       the standard error.  This is useful when debugging complex scripts  us‐
51       ing  the  "--" and "--file", since the command-line may be rewritten as
52       these are expanded.
53
54       The "--file" option tells dialog to read parameters from the file named
55       as its value.
56              dialog --file parameterfile
57       Blanks not within double-quotes are discarded (use backslashes to quote
58       single characters).  The result is inserted into the command-line,  re‐
59       placing  "--file" and its option value.  Interpretation of the command-
60       line resumes from that point.
61
62   Common Options
63       --ascii-lines
64              Rather than draw graphics lines around boxes, draw ASCII "+" and
65              "-" in the same place.  See also "--no-lines".
66
67       --aspect ratio
68              This  gives  you some control over the box dimensions when using
69              auto sizing (specifying 0 for height and width).  It  represents
70              width / height.  The default is 9, which means 9 characters wide
71              to every 1 line high.
72
73       --backtitle backtitle
74              Specifies a backtitle string to be displayed on the backdrop, at
75              the top of the screen.
76
77       --begin y x
78              Specify the position of the upper left corner of a dialog box on
79              the screen.
80
81       --cancel-label string
82              Override the label used for "Cancel" buttons.
83
84       --clear
85              Clears the widget screen, keeping only  the  screen_color  back‐
86              ground.   Use  this when you combine widgets with "--and-widget"
87              to erase the contents of a previous widget on the screen, so  it
88              won't  be seen under the contents of a following widget.  Under‐
89              stand this as the complement of "--keep-window".  To compare the
90              effects, use these:
91              All three widgets visible, staircase effect, ordered 1,2,3:
92                 dialog                         --begin 2 2 --yesno "" 0 0 \
93                     --and-widget               --begin 4 4 --yesno "" 0 0 \
94                     --and-widget               --begin 6 6 --yesno "" 0 0
95                 Only the last widget is left visible:
96                           dialog           --clear       --begin 2 2 --yesno "" 0 0 \
97                               --and-widget --clear       --begin 4 4 --yesno "" 0 0 \
98                               --and-widget               --begin 6 6 --yesno "" 0 0
99                           All three widgets visible, staircase effect, ordered 3,2,1:
100                                     dialog           --keep-window --begin 2 2 --yesno "" 0 0 \
101                                         --and-widget --keep-window --begin 4 4 --yesno "" 0 0 \
102                                         --and-widget               --begin 6 6 --yesno "" 0 0
103                                     First and third widget visible, staircase effect, ordered 3,1:
104                                               dialog           --keep-window --begin 2 2 --yesno "" 0 0 \
105                                                   --and-widget --clear       --begin 4 4 --yesno "" 0 0 \
106                                                   --and-widget               --begin 6 6 --yesno "" 0 0
107
108                                                      Note,  if  you  want  to
109                                                      restore original console
110                                                      colors   and  send  your
111                                                      cursor  home  after  the
112                                                      dialog    program    has
113                                                      exited,     use      the
114                                                      clear (1) command.
115
116                                               --colors
117                                                      Interpret  embedded "\Z"
118                                                      sequences in the  dialog
119                                                      text  by  the  following
120                                                      character,  which  tells
121                                                      dialog  to set colors or
122                                                      video   attributes:    0
123                                                      through  7  are the ANSI
124                                                      used in  curses:  black,
125                                                      red,    green,   yellow,
126                                                      blue, magenta, cyan  and
127                                                      white      respectively.
128                                                      Bold  is  set  by   'b',
129                                                      reset  by  'B'.  Reverse
130                                                      is set by 'r', reset  by
131                                                      'R'.   Underline  is set
132                                                      by 'u',  reset  by  'U'.
133                                                      The settings are cumula‐
134                                                      tive,   e.g.,   "\Zb\Z1"
135                                                      makes the following text
136                                                      bold  (perhaps   bright)
137                                                      red.    Restore   normal
138                                                      settings with "\Zn".
139
140                                               --cr-wrap
141                                                      Interpret embedded  new‐
142                                                      lines in the dialog text
143                                                      as  a  newline  on   the
144                                                      screen.  Otherwise, dia‐
145                                                      log will only wrap lines
146                                                      where   needed   to  fit
147                                                      inside  the  text   box.
148                                                      Even though you can con‐
149                                                      trol  line  breaks  with
150                                                      this,  dialog will still
151                                                      wrap any lines that  are
152                                                      too  long  for the width
153                                                      of the box.  Without cr-
154                                                      wrap, the layout of your
155                                                      text may be formatted to
156                                                      look  nice in the source
157                                                      code  of   your   script
158                                                      without   affecting  the
159                                                      way it will look in  the
160                                                      dialog.
161
162                                                      See  also the "--no-col‐
163                                                      lapse"   and    "--trim"
164                                                      options.
165
166                                               --create-rc file
167                                                      When   dialog   supports
168                                                      run-time  configuration,
169                                                      this can be used to dump
170                                                      a  sample  configuration
171                                                      file  to the file speci‐
172                                                      fied by file.
173
174                                               --defaultno
175                                                      Make the  default  value
176                                                      of  the yes/no box a No.
177                                                      Likewise,    make    the
178                                                      default  button  of wid‐
179                                                      gets that  provide  "OK"
180                                                      and  "Cancel"  a Cancel.
181                                                      If    "--nocancel"    or
182                                                      "--visit-items"      are
183                                                      given   those    options
184                                                      overrides  this,  making
185                                                      the    default    button
186                                                      always "Yes" (internally
187                                                      the same as "OK").
188
189                                               --default-item string
190                                                      Set the default item  in
191                                                      a   checklist,  form  or
192                                                      menu box.  Normally  the
193                                                      first item in the box is
194                                                      the default.
195
196                                               --exit-label string
197                                                      Override the label  used
198                                                      for "EXIT" buttons.
199
200                                               --extra-button
201                                                      Show  an  extra  button,
202                                                      between "OK"  and  "Can‐
203                                                      cel" buttons.
204
205                                               --extra-label string
206                                                      Override  the label used
207                                                      for   "Extra"   buttons.
208                                                      Note: for inputmenu wid‐
209                                                      gets, this  defaults  to
210                                                      "Rename".
211
212                                               --help Prints  the help message
213                                                      to dialog's output.  The
214                                                      help  message is printed
215                                                      if no options are given.
216
217                                               --help-button
218                                                      Show a help-button after
219                                                      "OK"  and  "Cancel" but‐
220                                                      tons,  i.e.,  in  check‐
221                                                      list, radiolist and menu
222                                                      boxes.  If "--item-help"
223                                                      is  also  given, on exit
224                                                      the return  status  will
225                                                      be  the  same as for the
226                                                      "OK"  button,  and   the
227                                                      item-help  text  will be
228                                                      written to dialog's out‐
229                                                      put   after   the  token
230                                                      "HELP".  Otherwise,  the
231                                                      return status will indi‐
232                                                      cate that the Help  but‐
233                                                      ton  was pressed, and no
234                                                      message printed.
235
236                                               --help-label string
237                                                      Override the label  used
238                                                      for "Help" buttons.
239
240                                               --help-status
241                                                      If  the  help-button  is
242                                                      selected,   writes   the
243                                                      checklist,  radiolist or
244                                                      form  information  after
245                                                      the   item-help   "HELP"
246                                                      information.   This  can
247                                                      be  used  to reconstruct
248                                                      the state of a checklist
249                                                      after   processing   the
250                                                      help request.
251
252                                               --ignore
253                                                      Ignore options that dia‐
254                                                      log  does not recognize.
255                                                      Some   well-known   ones
256                                                      such   as  "--icon"  are
257                                                      ignored anyway, but this
258                                                      is  a  better choice for
259                                                      compatibility with other
260                                                      implementations.
261
262                                               --input-fd fd
263                                                      Read keyboard input from
264                                                      the given file  descrip‐
265                                                      tor.      Most    dialog
266                                                      scripts  read  from  the
267                                                      standard  input, but the
268                                                      gauge  widget  reads   a
269                                                      pipe  (which  is  always
270                                                      standard  input).   Some
271                                                      configurations   do  not
272                                                      work properly when  dia‐
273                                                      log  tries to reopen the
274                                                      terminal.    Use    this
275                                                      option (with appropriate
276                                                      juggling    of     file-
277                                                      descriptors)   if   your
278                                                      script must work in that
279                                                      type of environment.
280
281                                               --insecure
282                                                      Makes  the password wid‐
283                                                      get friendlier but  less
284                                                      secure,    by    echoing
285                                                      asterisks for each char‐
286                                                      acter.
287
288                                               --item-help
289                                                      Interpret  the tags data
290                                                      for checklist, radiolist
291                                                      and  menu boxes adding a
292                                                      column  which  is   dis‐
293                                                      played   in  the  bottom
294                                                      line of the screen,  for
295                                                      the  currently  selected
296                                                      item.
297
298                                               --keep-tite
299                                                      Normally  dialog  checks
300                                                      to  see if it is running
301                                                      in an xterm, and in that
302                                                      case  tries  to suppress
303                                                      the       initialization
304                                                      strings  that would make
305                                                      it switch to the  alter‐
306                                                      nate  screen.  Switching
307                                                      between the  normal  and
308                                                      alternate   screens   is
309                                                      visually distracting  in
310                                                      a script which runs dia‐
311                                                      log several times.   Use
312                                                      this   option  to  allow
313                                                      dialog to use those ini‐
314                                                      tialization strings.
315
316                                               --keep-window
317                                                      Normally   when   dialog
318                                                      performs  several  tail‐
319                                                      boxbg  widgets connected
320                                                      by  "--and-widget",   it
321                                                      clears  the  old  widget
322                                                      from   the   screen   by
323                                                      painting  over  it.  Use
324                                                      this option to  suppress
325                                                      that repainting.
326
327                                                      At exit, dialog repaints
328                                                      all of the widgets which
329                                                      have  been  marked  with
330                                                      "--keep-window", even if
331                                                      they  are  not tailboxbg
332                                                      widgets.   That   causes
333                                                      them  to be repainted in
334                                                      reverse order.  See  the
335                                                      discussion     of    the
336                                                      "--clear"   option   for
337                                                      examples.
338
339                                               --max-input size
340                                                      Limit  input  strings to
341                                                      the given size.  If  not
342                                                      specified,  the limit is
343                                                      2048.
344
345                                               --no-cancel
346
347                                               --nocancel
348                                                      Suppress  the   "Cancel"
349                                                      button   in   checklist,
350                                                      inputbox  and  menu  box
351                                                      modes.    A  script  can
352                                                      still test if  the  user
353                                                      pressed  the  ESC key to
354                                                      cancel to quit.
355
356                                               --no-collapse
357                                                      Normally dialog converts
358                                                      tabs   to   spaces   and
359                                                      reduces multiple  spaces
360                                                      to  a  single  space for
361                                                      text which is  displayed
362                                                      in a message boxes, etc.
363                                                      Use this option to  dis‐
364                                                      able that feature.  Note
365                                                      that dialog  will  still
366                                                      wrap  text,  subject  to
367                                                      the   "--cr-wrap"    and
368                                                      "--trim" options.
369
370                                               --no-kill
371                                                      Tells  dialog to put the
372                                                      tailboxbg  box  in   the
373                                                      background, printing its
374                                                      process id  to  dialog's
375                                                      output.   SIGHUP is dis‐
376                                                      abled for the background
377                                                      process.
378
379                                               --no-label string
380                                                      Override  the label used
381                                                      for "No" buttons.
382
383                                               --no-lines
384                                                      Rather than  draw  lines
385                                                      around  boxes, draw spa‐
386                                                      ces in the  same  place.
387                                                      See    also    "--ascii-
388                                                      lines".
389
390                                               --no-shadow
391                                                      Suppress  shadows   that
392                                                      would  be  drawn  to the
393                                                      right and bottom of each
394                                                      dialog box.
395
396                                               --ok-label string
397                                                      Override  the label used
398                                                      for "OK" buttons.
399
400                                               --output-fd fd
401                                                      Direct  output  to   the
402                                                      given  file  descriptor.
403                                                      Most   dialog    scripts
404                                                      write  to  the  standard
405                                                      error,  but  error  mes‐
406                                                      sages  may also be writ‐
407                                                      ten there, depending  on
408                                                      your script.
409
410                                               --print-maxsize
411                                                      Print  the  maximum size
412                                                      of dialog  boxes,  i.e.,
413                                                      the screen size, to dia‐
414                                                      log's output.  This  may
415                                                      be  used  alone, without
416                                                      other options.
417
418                                               --print-size
419                                                      Prints the size of  each
420                                                      dialog  box  to dialog's
421                                                      output.
422
423                                               --print-version
424                                                      Prints dialog's  version
425                                                      to    dialog's   output.
426                                                      This may be used  alone,
427                                                      without other options.
428
429                                               --separate-output
430                                                      For  checklist  widgets,
431                                                      output result  one  line
432                                                      at a time, with no quot‐
433                                                      ing.   This  facilitates
434                                                      parsing  by another pro‐
435                                                      gram.
436
437                                               --separator string
438
439                                               --separate-widget string
440                                                      Specify  a  string  that
441                                                      will separate the output
442                                                      on dialog's output  from
443                                                      each  widget.   This  is
444                                                      used to simplify parsing
445                                                      the  result  of a dialog
446                                                      with  several   widgets.
447                                                      If  this  option  is not
448                                                      given, the default sepa‐
449                                                      rator  string  is  a tab
450                                                      character.
451
452                                               --shadow
453                                                      Draw  a  shadow  to  the
454                                                      right and bottom of each
455                                                      dialog box.
456
457                                               --single-quoted
458                                                      Use  single-quoting   as
459                                                      needed (and no quotes if
460                                                      unneeded) for the output
461                                                      of  checklist's  as well
462                                                      as the  item-help  text.
463                                                      If  this  option  is not
464                                                      set, dialog uses  double
465                                                      quotes around each item.
466                                                      That requires occasional
467                                                      use  of  backslashes  to
468                                                      make the  output  useful
469                                                      in shell scripts.
470
471                                               --size-err
472                                                      Check the resulting size
473                                                      of a dialog  box  before
474                                                      trying to use it, print‐
475                                                      ing the  resulting  size
476                                                      if it is larger than the
477                                                      screen.  (This option is
478                                                      obsolete, since all new-
479                                                      window     calls     are
480                                                      checked).
481
482                                               --sleep secs
483                                                      Sleep  (delay)  for  the
484                                                      given number of  seconds
485                                                      after  processing a dia‐
486                                                      log box.
487
488                                               --stderr
489                                                      Direct  output  to   the
490                                                      standard error.  This is
491                                                      the    default,    since
492                                                      curses  normally  writes
493                                                      screen  updates  to  the
494                                                      standard output.
495
496                                               --stdout
497                                                      Direct   output  to  the
498                                                      standard  output.   This
499                                                      option  is  provided for
500                                                      compatibility with Xdia‐
501                                                      log, however using it in
502                                                      portable scripts is  not
503                                                      recommended,       since
504                                                      curses  normally  writes
505                                                      its  screen  updates  to
506                                                      the standard output.  If
507                                                      you   use  this  option,
508                                                      dialog    attempts    to
509                                                      reopen  the  terminal so
510                                                      it can write to the dis‐
511                                                      play.   Depending on the
512                                                      platform and your  envi‐
513                                                      ronment, that may fail.
514
515                                               --tab-correct
516                                                      Convert each tab charac‐
517                                                      ter to one or more  spa‐
518                                                      ces   (for  the  textbox
519                                                      widget; otherwise  to  a
520                                                      single  space).   Other‐
521                                                      wise, tabs are  rendered
522                                                      according  to the curses
523                                                      library's    interpreta‐
524                                                      tion.
525
526                                               --tab-len n
527                                                      Specify  the  number  of
528                                                      spaces that a tab  char‐
529                                                      acter  occupies  if  the
530                                                      "--tab-correct"   option
531                                                      is  given.   The default
532                                                      is 8.   This  option  is
533                                                      only  effective  for the
534                                                      textbox widget.
535
536                                               --timeout secs
537                                                      Timeout (exit with error
538                                                      code)    if    no   user
539                                                      response   within    the
540                                                      given number of seconds.
541                                                      This  is  overridden  if
542                                                      the  background "--tail‐
543                                                      boxbg is used.  A  time‐
544                                                      out  of  zero seconds is
545                                                      ignored.
546
547                                               --title title
548                                                      Specifies a title string
549                                                      to  be  displayed at the
550                                                      top of the dialog box.
551
552                                               --trace filename
553                                                      logs keystrokes  to  the
554                                                      given  file.   Use  con‐
555                                                      trol/T to log a  picture
556                                                      of  the  current  dialog
557                                                      window.
558
559                                               --trim eliminate        leading
560                                                      blanks,   trim   literal
561                                                      newlines  and   repeated
562                                                      blanks    from   message
563                                                      text.
564
565                                                      See also the "--cr-wrap"
566                                                      and      "--no-collapse"
567                                                      options.
568
569                                               --version
570                                                      Same  as   "--print-ver‐
571                                                      sion".
572
573                                               --visit-items
574                                                      Modify the tab-traversal
575                                                      of checklist,  radiobox,
576                                                      menubox and inputmenu to
577                                                      include  the   list   of
578                                                      items   as  one  of  the
579                                                      states.  This is  useful
580                                                      as  a  visual aid, i.e.,
581                                                      the   cursor    position
582                                                      helps some users.
583
584                                                      When   this   option  is
585                                                      given,  the  cursor   is
586                                                      initially  placed on the
587                                                      list.      Abbreviations
588                                                      (the first letter of the
589                                                      tag) apply to  the  list
590                                                      items.   If  you  tab to
591                                                      the button row, abbrevi‐
592                                                      ations apply to the but‐
593                                                      tons.
594
595                                               --yes-label string
596                                                      Override the label  used
597                                                      for "Yes" buttons.
598
599   Box Options
600       All dialog boxes have at least three parameters:
601
602       text the caption or contents of the box.
603
604       height
605            the height of the dialog box.
606
607       width
608            the width of the dialog box.
609
610       Other parameters depend on the box type.
611
612       --calendar text height width day month year
613              A  calendar  box  displays  month,  day  and  year in separately
614              adjustable windows.  If the values for day, month  or  year  are
615              missing or negative, the current date's corresponding values are
616              used.  You can increment or decrement any  of  those  using  the
617              left-,  up-, right- and down-arrows.  Use vi-style h, j, k and l
618              for moving around the array of days in  a  month.   Use  tab  or
619              backtab  to move between windows.  If the year is given as zero,
620              the current date is used as an initial value.
621
622              On exit, the date is printed in the form day/month/year.
623
624       --checklist text height width list-height [ tag item status ] ...
625              A checklist box is similar to a menu  box;  there  are  multiple
626              entries  presented  in  the form of a menu.  Instead of choosing
627              one entry among the entries, each entry can be turned on or  off
628              by  the  user.  The initial on/off state of each entry is speci‐
629              fied by status.
630
631              On exit, a list of the tag strings of  those  entries  that  are
632              turned  on  will be printed on dialog's output.  If the "--sepa‐
633              rate-output" option is not given, the strings will be quoted  to
634              make it simple for scripts to separate them.  See the "--single-
635              quoted" option, which modifies the quoting behavior.
636
637       --dselect filepath height width
638              The directory-selection dialog displays a text-entry  window  in
639              which  you  can  type a directory, and above that a windows with
640              directory names.
641
642              Here filepath can be a filepath in which case the directory win‐
643              dow  will  display  the  contents of the path and the text-entry
644              window will contain the preselected directory.
645
646              Use tab or arrow keys to move between the windows.   Within  the
647              directory  window, use the up/down arrow keys to scroll the cur‐
648              rent selection.  Use the space-bar to copy the current selection
649              into the text-entry window.
650
651              Typing any printable characters switches focus to the text-entry
652              window, entering that character as well as scrolling the  direc‐
653              tory window to the closest match.
654
655              Use  a  carriage return or the "OK" button to accept the current
656              value in the text-entry window and exit.
657
658              On exit, the contents of the text-entry window  are  written  to
659              dialog's output.
660
661       --editbox filepath height width
662              The  edit-box  dialog displays a copy of the file.  You may edit
663              it using the backspace, delete and cursor keys to correct typing
664              errors.    It   also  recognizes  pageup/pagedown.   Unlike  the
665              --inputbox, you must tab to the  "OK"  or  "Cancel"  buttons  to
666              close  the dialog.  Pressing the "Enter" key within the box will
667              split the corresponding line.
668
669              On exit, the contents of the edit window are written to dialog's
670              output.
671
672       --form text height width formheight [ label y x item y x flen ilen ] ...
673              The form dialog displays a form consisting of labels and fields,
674              which are positioned on a scrollable window by coordinates given
675              in the script.  The field length flen and input-length ilen tell
676              how long the field can be.  The former defines the length  shown
677              for  a  selected field, while the latter defines the permissible
678              length of the data entered in the field.
679
680              -  If flen is zero, the corresponding field cannot  be  altered.
681                 and the contents of the field determine the displayed-length.
682
683              -  If  flen  is  negative,  the  corresponding  field  cannot be
684                 altered, and the negated value of flen is used  as  the  dis‐
685                 played-length.
686
687              -  If ilen is zero, it is set to flen.
688
689              Use  up/down  arrows  (or  control/N, control/P) to move between
690              fields.  Use tab to move between windows.
691
692              On exit, the contents of the form-fields are written to dialog's
693              output,  each  field  separated  by a newline.  The text used to
694              fill non-editable fields (flen is zero or negative) is not writ‐
695              ten out.
696
697       --fselect filepath height width
698              The fselect (file-selection) dialog displays a text-entry window
699              in which you can type a filename (or directory), and above  that
700              two windows with directory names and filenames.
701
702              Here  filepath  can  be  a  filepath  in which case the file and
703              directory windows will display the contents of the path and  the
704              text-entry window will contain the preselected filename.
705
706              Use  tab  or arrow keys to move between the windows.  Within the
707              directory or filename windows, use the  up/down  arrow  keys  to
708              scroll  the  current  selection.   Use the space-bar to copy the
709              current selection into the text-entry window.
710
711              Typing any printable characters switches focus to the text-entry
712              window,  entering that character as well as scrolling the direc‐
713              tory and filename windows to the closest match.
714
715              Typing the space character forces dialog to complete the current
716              name  (up  to  the point where there may be a match against more
717              than one entry).
718
719              Use a carriage return or the "OK" button to accept  the  current
720              value in the text-entry window and exit.
721
722              On  exit,  the  contents of the text-entry window are written to
723              dialog's output.
724
725       --gauge text height width [percent]
726              A gauge box displays a meter along the bottom of the  box.   The
727              meter  indicates  the percentage.  New percentages are read from
728              standard input, one integer per line.  The meter is  updated  to
729              reflect  each  new  percentage.  If the standard input reads the
730              string "XXX", then subsequent lines up to another "XXX" are used
731              for  a  new  prompt.  The gauge exits when EOF is reached on the
732              standard input.
733
734              The percent value denotes the initial percentage  shown  in  the
735              meter.  If not specified, it is zero.
736
737              On  exit,  no  text  is  written to dialog's output.  The widget
738              accepts no input, so the exit status is always OK.
739
740       --infobox text height width
741              An info box is basically a message box.  However, in this  case,
742              dialog will exit immediately after displaying the message to the
743              user.  The screen is not cleared when dialog exits, so that  the
744              message will remain on the screen until the calling shell script
745              clears it later.  This is useful when you  want  to  inform  the
746              user  that some operations are carrying on that may require some
747              time to finish.
748
749              On exit, no text is written to dialog's output.   Only  an  "OK"
750              button  is  provided  for  input,  but an ESC exit status may be
751              returned.
752
753       --inputbox text height width [init]
754              An input box is useful when  you  want  to  ask  questions  that
755              require  the  user  to input a string as the answer.  If init is
756              supplied it is used to initialize the input string.  When enter‐
757              ing  the  string,  the  backspace, delete and cursor keys can be
758              used to correct typing errors.  If the input  string  is  longer
759              than  can  fit  in  the  dialog  box,  the  input  field will be
760              scrolled.
761
762              On exit, the input string will be printed on dialog's output.
763
764       --inputmenu text height width menu-height [ tag item ] ...
765              An inputmenu box is very similar to an ordinary menu box.  There
766              are only a few differences between them:
767
768              1.  The   entries   are  not  automatically  centered  but  left
769                  adjusted.
770
771              2.  An extra button (called Rename) is  implied  to  rename  the
772                  current item when it is pressed.
773
774              3.  It  is  possible to rename the current entry by pressing the
775                  Rename button.  Then dialog will write the following on dia‐
776                  log's output.
777
778                  RENAMED <tag> <item>
779
780       --menu text height width menu-height [ tag item ] ...
781              As  its  name  suggests,  a menu box is a dialog box that can be
782              used to present a list of choices in the form of a menu for  the
783              user to choose.  Choices are displayed in the order given.  Each
784              menu entry consists of a tag string and an item string.  The tag
785              gives  the entry a name to distinguish it from the other entries
786              in the menu.  The item is a short description of the option that
787              the  entry  represents.   The  user  can  move  between the menu
788              entries by pressing the cursor keys, the first letter of the tag
789              as  a  hot-key,  or  the  number keys 1-9. There are menu-height
790              entries displayed in the menu at one time, but the menu will  be
791              scrolled if there are more entries than that.
792
793              On exit the tag of the chosen menu entry will be printed on dia‐
794              log's output.  If the "--help-button" option is given, the  cor‐
795              responding  help  text  will  be printed if the user selects the
796              help button.
797
798       --mixedform text height width formheight [ label y x item y x flen ilen itype ] ...
799              The mixedform dialog displays a form consisting  of  labels  and
800              fields,  much  like  the  --form dialog.  It differs by adding a
801              field-type parameter to each field's description.  Each  bit  in
802              the type denotes an attribute of the field:
803
804              1    hidden, e.g., a password field.
805
806              2    readonly, e.g., a label.
807
808       --mixedgauge text height width percent [ tag1 item1 ] ...
809              A  mixedgauge  box displays a meter along the bottom of the box.
810              The meter indicates the percentage.
811
812              It also displays a list of the tag- and item-values at  the  top
813              of the box.  See dialog(3) for the tag values.
814
815              The  text is shown as a caption between the list and meter.  The
816              percent value denotes the initial percentage shown in the meter.
817
818              No provision is made for reading data from the standard input as
819              --gauge does.
820
821              On  exit,  no  text  is  written to dialog's output.  The widget
822              accepts no input, so the exit status is always OK.
823
824       --msgbox text height width
825              A message box is very similar to a yes/no box.  The only differ‐
826              ence  between  a  message box and a yes/no box is that a message
827              box has only a single OK button.  You can use this dialog box to
828              display  any  message  you like.  After reading the message, the
829              user can press the ENTER key so that dialog will  exit  and  the
830              calling shell script can continue its operation.
831
832              If  the message is too large for the space, dialog may allow you
833              to scroll it, provided that the underlying curses implementation
834              is  capable  enough.  In this case, a percentage is shown in the
835              base of the widget.
836
837              On exit, no text is written to dialog's output.   Only  an  "OK"
838              button  is  provided  for  input,  but an ESC exit status may be
839              returned.
840
841       --pause text height width seconds
842              A pause box displays a meter along the bottom of the  box.   The
843              meter  indicates  how  many  seconds remain until the end of the
844              pause.  The pause exits when timeout is reached (status  OK)  or
845              the user presses the Exit button (status CANCEL).
846
847       --passwordbox text height width [init]
848              A  password box is similar to an input box, except that the text
849              the user enters is not displayed.  This is useful when prompting
850              for  passwords or other sensitive information.  Be aware that if
851              anything is passed in "init", it will be visible in the system's
852              process table to casual snoopers.  Also, it is very confusing to
853              the user to provide them with a  default  password  they  cannot
854              see.   For  these  reasons,  using "init" is highly discouraged.
855              See "--insecure" if you do not care about your password.
856
857              On exit, the input string will be printed on dialog's output.
858
859       --passwordform text height width formheight [ label y x item y x flen ilen ] ...
860              This is identical to --form except  that  all  text  fields  are
861              treated as password widgets rather than inputbox widgets.
862
863       --progressbox text height width
864
865       --progressbox height width
866              A progressbox is similar to an tailbox, except that it will exit
867              when it reaches the end of the file.  If  three  parameters  are
868              given, it displays the text under the title, delineated from the
869              scrolling file's contents.  If only two  parameters  are  given,
870              this text is omitted.
871
872       --radiolist text height width list-height  [ tag item status ] ...
873              A  radiolist  box is similar to a menu box.  The only difference
874              is that you can indicate which entry is currently  selected,  by
875              setting its status to on.
876
877              On  exit,  the  name of the selected item is written to dialog's
878              output.
879
880       --tailbox file height width
881              Display text from a file in a dialog box, as in a "tail -f" com‐
882              mand.   Scroll  left/right using vi-style 'h' and 'l', or arrow-
883              keys.  A '0' resets the scrolling.
884
885              On exit, no text is written to dialog's output.   Only  an  "OK"
886              button  is  provided  for  input,  but an ESC exit status may be
887              returned.
888
889       --tailboxbg file height width
890              Display text from a file in a dialog box as a  background  task,
891              as  in  a "tail -f &" command.  Scroll left/right using vi-style
892              'h' and 'l', or arrow-keys.  A '0' resets the scrolling.
893
894              Dialog treats the background task specially if there  are  other
895              widgets  (--and-widget) on the screen concurrently.  Until those
896              widgets are closed (e.g., an "OK"), dialog will perform  all  of
897              the  tailboxbg widgets in the same process, polling for updates.
898              You may use a tab to traverse between the widgets on the screen,
899              and  close them individually, e.g., by pressing ENTER.  Once the
900              non-tailboxbg widgets are closed, dialog forks a copy of  itself
901              into  the  background,  and  prints its process id if the "--no-
902              kill" option is given.
903
904              On exit, no text is written to dialog's output.  Only an  "EXIT"
905              button  is  provided  for  input,  but an ESC exit status may be
906              returned.
907
908              NOTE: Older versions of dialog forked immediately and  attempted
909              to  update  the screen individually.  Besides being bad for per‐
910              formance, it was unworkable.  Some older scripts  may  not  work
911              properly with the polled scheme.
912
913       --textbox file height width
914              A  text  box  lets  you display the contents of a text file in a
915              dialog box.  It is like a simple text file viewer.  The user can
916              move  through  the  file by using the cursor, page-up, page-down
917              and HOME/END keys available on most keyboards.  If the lines are
918              too  long to be displayed in the box, the LEFT/RIGHT keys can be
919              used to scroll the text region horizontally.  You may  also  use
920              vi-style keys h, j, k, l in place of the cursor keys, and B or N
921              in place of the page-up  and  page-down  keys.   Scroll  up/down
922              using  vi-style  'k'  and 'j', or arrow-keys.  Scroll left/right
923              using vi-style 'h' and 'l', or arrow-keys.   A  '0'  resets  the
924              left/right  scrolling.   For  more convenience, vi-style forward
925              and backward searching functions are also provided.
926
927              On exit, no text is written to dialog's output.  Only an  "EXIT"
928              button  is  provided  for  input,  but an ESC exit status may be
929              returned.
930
931       --timebox text height [width hour minute second]
932              A dialog is displayed which allows you to  select  hour,  minute
933              and  second.  If the values for hour, minute or second are miss‐
934              ing or negative, the current  date's  corresponding  values  are
935              used.   You  can  increment  or decrement any of those using the
936              left-, up-, right- and down-arrows.  Use tab or backtab to  move
937              between windows.
938
939              On exit, the result is printed in the form hour:minute:second.
940
941       --yesno text height width
942              A yes/no dialog box of size height rows by width columns will be
943              displayed.  The string specified by text is displayed inside the
944              dialog  box.   If this string is too long to fit in one line, it
945              will be automatically divided into multiple lines at appropriate
946              places.  The text string can also contain the sub-string "\n" or
947              newline characters `\n' to  control  line  breaking  explicitly.
948              This  dialog box is useful for asking questions that require the
949              user to answer either yes or no.  The dialog box has a Yes  but‐
950              ton  and  a  No  button, in which the user can switch between by
951              pressing the TAB key.
952
953              On exit, no text is written to dialog's output.  In addition  to
954              the "Yes" and "No" exit codes (see DIAGNOSTICS) an ESC exit sta‐
955              tus may be returned.
956
957              The codes used for "Yes" and "No" match those used for "OK"  and
958              "Cancel", internally no distinction is made.
959
960   Obsolete Options
961       --beep This was used to tell the original cdialog that it should make a
962              beep when the separate processes of the tailboxbg  widget  would
963              repaint the screen.
964
965       --beep-after
966              Beep  after a user has completed a widget by pressing one of the
967              buttons.
968

RUN-TIME CONFIGURATION

970       1.  Create a sample configuration file by typing:
971
972                 "dialog --create-rc <file>"
973
974       2.  At start, dialog determines the settings to use as follows:
975
976           a)  if environment variable DIALOGRC is set, its  value  determines
977               the name of the configuration file.
978
979           b)  if  the  file in (a) is not found, use the file $HOME/.dialogrc
980               as the configuration file.
981
982           c)  if the file in (b) is not found, try using  the  GLOBALRC  file
983               determined at compile-time, i.e., /etc/dialogrc.
984
985           d)  if the file in (c) is not found, use compiled in defaults.
986
987       3.  Edit  the  sample configuration file and copy it to some place that
988           dialog can find, as stated in step 2 above.
989

KEY BINDINGS

991       You can override or add to key bindings in dialog by adding to the con‐
992       figuration  file.   Dialog's  bindkey  command  maps single keys to its
993       internal coding.
994                 bindkey widget curses_key dialog_key
995                 The widget name can be "*" (all widgets), or specific widgets
996                 such  as  textbox.  Specific widget bindings override the "*"
997                 bindings.  User-defined bindings override the built-in  bind‐
998                 ings.
999
1000                 The curses_key can be any of the names derived from curses.h,
1001                 e.g., "HELP" from "KEY_HELP".  Dialog  also  recognizes  ANSI
1002                 control characters such as "^A", "^?", as well as C1-controls
1003                 such as "~A" and "~?".  Finally, it allows any single charac‐
1004                 ter to be escaped with a backslash.
1005
1006                 Dialog's   internal   keycode   names   correspond   to   the
1007                 DLG_KEYS_ENUM  type  in   dlg_keys.h,   e.g.,   "HELP"   from
1008                 "DLGK_HELP".
1009

ENVIRONMENT

1011       DIALOGOPTS     Define  this variable to apply any of the common options
1012                      to each widget.  Most of the common  options  are  reset
1013                      before  processing  each widget.  If you set the options
1014                      in this environment variable, they are applied  to  dia‐
1015                      log's state after the reset.  As in the "--file" option,
1016                      double-quotes and backslashes are interpreted.
1017
1018                      The "--file" option is not considered  a  common  option
1019                      (so  you  cannot  embed it within this environment vari‐
1020                      able).
1021
1022       DIALOGRC       Define this variable if you want to specify the name  of
1023                      the configuration file to use.
1024
1025       DIALOG_CANCEL
1026
1027       DIALOG_ERROR
1028
1029       DIALOG_ESC
1030
1031       DIALOG_EXTRA
1032
1033       DIALOG_HELP
1034
1035       DIALOG_ITEM_HELP
1036
1037       DIALOG_OK      Define any of these variables to change the exit code on
1038                      Cancel (1), error (-1), ESC (255), Extra (3), Help  (2),
1039                      Help  with  --item-help  (2), or OK (0).  Normally shell
1040                      scripts cannot distinguish between -1 and 255.
1041
1042       DIALOG_TTY     Set this variable to "1" to provide  compatibility  with
1043                      older  versions  of  dialog  which  assumed  that if the
1044                      script redirects the standard output, that  the  "--std‐
1045                      out" option was given.
1046

FILES

1048       $HOME/.dialogrc     default configuration file
1049

EXAMPLES

1051       The  dialog sources contain several samples of how to use the different
1052       box options and how they look.  Just take a  look  into  the  directory
1053       samples/ of the source.
1054

DIAGNOSTICS

1056       Exit  status  is  subject to being overridden by environment variables.
1057       Normally they are:
1058
1059       0    if dialog is exited by pressing the Yes or OK button.
1060
1061       1    if the No or Cancel button is pressed.
1062
1063       2    if the Help button is pressed.
1064
1065       3    if the Extra button is pressed.
1066
1067       -1   if errors occur inside dialog or dialog is exited by pressing  the
1068            ESC key.
1069

COMPATIBILITY

1071       You may want to write scripts which run with other dialog "clones".
1072
1073   ORIGINAL DIALOG
1074       First, there is the "original" dialog program to consider (versions 0.3
1075       to 0.9).  It had some misspelled (or inconsistent) options.  The dialog
1076       program  maps  those  deprecated  options  to the preferred ones.  They
1077       include:
1078
1079              Option         Treatment
1080              ─────────────────────────────────
1081              --beep-after   ignored
1082              --guage        mapped to --gauge
1083
1084   XDIALOG
1085       Technically, "Xdialog", this is an X application.  With some  care,  it
1086       is  possible  to  write  useful scripts that work with both Xdialog and
1087       dialog.
1088
1089       The dialog program ignores these options which are recognized by  Xdia‐
1090       log:
1091
1092              Option             Treatment
1093              ───────────────────────────────────────────────
1094              --allow-close      ignored
1095              --auto-placement   ignored
1096              --fixed-font       ignored
1097              --icon             ignored
1098              --keep-colors      ignored
1099              --no-close         ignored
1100              --no-cr-wrap       ignored
1101              --screen-center    ignored
1102
1103              --separator        mapped to --separate-output
1104              --smooth           ignored
1105              --under-mouse      ignored
1106              --wmclass          ignored
1107
1108       Xdialog's  manpage has a section discussing its compatibility with dia‐
1109       log.
1110
1111   WHIPTAIL
1112       Then there is whiptail.  For practical purposes, it  is  maintained  by
1113       Debian.  Its documentation claims
1114
1115              whiptail(1) is a lightweight replacement for dialog(1),
1116              to provide dialog boxes for shell scripts. It is built on the
1117              newt windowing library rather than the ncurses library, allowing
1118              it to be smaller in embedded enviroments such as installers,
1119              rescue disks, etc.
1120
1121              whiptail is designed to be drop-in compatible with dialog, but
1122              has less features: some dialog boxes are not implemented, such
1123              as tailbox, timebox, calendarbox, etc.
1124
1125       Comparing  actual sizes (Debian testing, 2007/1/10): The total of sizes
1126       for whiptail, the newt, popt and slang libraries is 757kb.  The  compa‐
1127       rable  number  for  dialog  (counting ncurses) is 520kb.  Disregard the
1128       first paragraph.
1129
1130       The second paragraph is misleading, since whiptail also does  not  work
1131       for  common options of dialog, such as the gauge box.  whiptail is less
1132       compatible with dialog than the decade-old original dialog 0.4 program.
1133
1134       whiptail's manpage borrows features from dialog, e.g.,  --default-item,
1135       --output-fd,  but  oddly  cites  only  dialog  versions  up to 0.4 as a
1136       source.  That is, its manpage refers to features  which  were  borrowed
1137       from  more  recent versions of dialog, e.g., the --gauge and --password
1138       boxes, as well as options such as  -separate-output.   Somewhat  humor‐
1139       ously, one may note that the popt feature (undocumented in its manpage)
1140       of using a "--" as an escape was documented in dialog's manpage about a
1141       year before it was mentioned in whiptail's manpage.  whiptail's manpage
1142       incorrectly attributes that to getopt (and is inaccurate anyway).
1143
1144       Debian uses whiptail for the official dialog variation.
1145
1146       The dialog program ignores or maps these options which  are  recognized
1147       by whiptail:
1148
1149              Option         Treatment
1150              ─────────────────────────────────────
1151              --fb           ignored
1152              --fullbutton   ignored
1153              --nocancel     mapped to --no-cancel
1154              --noitem       ignored
1155

BUGS

1157       Perhaps.
1158

AUTHOR

1160       Thomas E. Dickey (updates for 0.9b and beyond)
1161

CONTRIBUTORS

1163       Kiran Cherupally - the mixed form and mixed gauge widgets.
1164
1165       Tobias C. Rittweiler
1166
1167       Valery Reznic - the form and progressbox widgets.
1168
1169       Yura Kalinichenko adapted the gauge widget as "pause".
1170
1171       This  is  a  rewrite (except as needed to provide compatibility) of the
1172       earlier version of dialog 0.9a, which lists as authors:
1173
1174              Savio Lam - version 0.3, "dialog"
1175
1176              Stuart Herbert - patch for version 0.4
1177
1178              Marc Ewing - the gauge widget.
1179
1180              Pasquale De Marco "Pako" - version 0.9a, "cdialog"
1181
1182
1183
1184$Date: 2007/02/22 21:02:54 $                                         DIALOG(1)
Impressum