Zenity is an open-source program(command) of Linux that will display GTK+(graphical Program of Linux) dialogs box, and return the user input.
This allows you to present information, and ask for information from the user, from all manner of shell scripts.
For example, zenity — — question will return whatever User inputs. Depending on whether the user pressed OK, Cancel or timeout has been reached. zenity — entry will output on standard output what the user typed into the text entry field.
here are other alternatives, but nothing compares to the simplicity of Zenity, specially when you don’t need complex programming. Zenity, a tool you must have your hands on.
Zenity Features
- Cross Platform Application
- Allow GTK+ Dialog Box Execution
- Command Line Tool
- Support in Shell Scripting
Usefulness
- Easy GUI Creation
- Less features than other complex Tools
- Enables shell scripts to interact with a GUI users
- Simple dialog creation is possible for graphical user interaction
Since Zenity is available for all known major platforms, and based on GTK+ library, Zenity program can be ported to/from another platform.
Various Options Of Zenity-
- zenity --calendar: (Will show calendar in a graphical manner)
- Zenity --Entry : Display text entry dialog
3. zenity --error: It will Display error dialog Box
4. zenity --info: It will Display info dialog.
5. zenity --color-selection: It will Display color selection dialog.
6. zenity --question: It will Display question dialog.
7. zenity --file-selection: It will Display file selection dialog
8. zenity --notification: It will Display notification
9.zenity --warning: It will Display warning dialog
10. zenity --password: It will Display password dialog
Miscellaneous options
?, — help
Show summary of options.
--about
Display an about dialog.
--version
Show version of program.
Also the standard GTK+ options are accepted. For more information about the GTK+ options, execute following command.
zenity — help-gtk
For more information on how to create custom dialog boxes using shell script, visit at following reference page Zenity.
Thank-You !
- Did you find this blog post helpful? Share it with your friends!