previous next contents | bottom |
Xdialog [<GTK+ options>] [<common options>] [<transient options>] <box option> ...
and:
Xdialog <special option>
The [<common options>] [<transient options>] <box option> sequence may be repeated several times in the same Xdialog command line (this is called dialog chaining). The common/transient options may be omited but there must always be a <box option> as the last Xdialog option.
On completion of each box option (i.e. every time a widget is closed) Xdialog sends any result (text, numbers) as one or more strings to stderr (this can be changed so that the results are sent to stdout thanks to a common option).
When Xdialog terminates (i.e. when all the <box options> are processed or when an error occurs), the exit code may take the following values:
Note that when chaining dialogs, the chain is broken and Xdialog terminates as soon as a widget returns a non zero exit code.
When using Xdialog from a shell, it is therefore usually invoked as follow:
RESULTS=`Xdialog --stdout ...` # It is also possible to redirect Xdialog output to a temporary file. EXIT_CODE=$? case $EXIT_CODE in 0) # All OK. The $RESULTS variable holds everything entered/choosed by the user. .../... ;; 1) # Cancel/No pressed. .../... ;; 255) # An error occured or the box was closed. .../... ;; esac
For examples of how to use each widget, please read the box options section of this documentation and browse the samples directory.
See also the (c)dialog compatibility notes.
previous next contents | top |