When you write scripts, you can use
You can create a dialogue to obtain information from the user. For example, you can prompt the user to select a date from a calendar dialogue, or to select a file from a file selection dialogue.
You can create a dialogue to provide the user with information. For example, you can use a progress dialogue to indicate the current status of an operation, or use a warning message dialogue to alert the user.
When the user closes the dialog,
When you write
For example, use:
Do not use:
If you do not use quotation marks, you might get unexpected results.
An access key is a key that enables you to perform an action from the keyboard rather than use the mouse to choose a command from a menu or dialogue. Each access key is identified by an underlined letter on a menu or dialogue option.
Some
Zenity returns the following exit codes:
Exit Code |
Description |
0 |
The user has pressed either |
1 |
The user has either pressed |
-1 |
An unexpected error has occurred. |
5 |
The dialogue has been closed because the timeout has been reached. |
All Zenity dialogs support the following general options:
Specifies the title of a dialogue.
Specifies the icon that is displayed in the window frame of the dialogue. There are 4 stock icons also available by providing the following keywords - 'info', 'warning', 'question' and 'error'.
Specifies the width of the dialogue.
Specifies the height of the dialogue.
Specifies the timeout in seconds after which the dialogue is closed.
Zenity provides the following help options:
Displays shortened help text.
Displays full help text for all dialogues.
Displays help text for general dialogue options.
Displays help text for calendar dialogue options.
Displays help text for text entry dialogue options.
Displays help text for error dialogue options.
Displays help text for information dialogue options.
Displays help text for file selection dialogue options.
Displays help text for list dialogue options.
Displays help text for notification icon options.
Displays help text for progress dialogue options.
Displays help text for question dialogue options.
Displays help text for warning dialogue options.
Displays help for text information dialogue options.
Displays help for miscellaneous options.
Displays help for GTK+ options.
Zenity also provides the following miscellaneous options:
Displays the
Displays the version number of Zenity.
Zenity supports the standard GTK+ options. For more information about the GTK+ options, execute the
Normally, Zenity detects the terminal window from which it was launched and keeps itself above that window. This behavior can be disabled by unsetting the WINDOWID environment variable.