Zenity is an open source and a cross-platform application which displays GTK+ Dialog Boxes in command-line and using shell scripts. It allows to ask and present information to/from shell in Graphical Boxes. The application lets you create Graphical dialog boxes in command-line and makes the interaction between user and shell very easy.
we can use zenity to create simple dialog that interact graphically with the user.
For example, zenity: — question will return either 0, 1 or 5, 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.
- FOSS Software
- Cross Platform Application
- Allow GTK+ Dialog Box Execution
- Command Line Tool
- Support in Shell Scripting
- 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
>_ man zenity
This program follows the usual GNU command line syntax, with long options starting with two dashes
Display calendar dialog
Display text entry dialog
Display error dialog
Display file selection dialog
— info Display info dialog
— list Display list dialog
>_ zenity — — calendar
>_ zenity — question — title “Alert” — text “Can we proceed?”
>_ zenity — list — checklist — column “Pragrming” — column “Language” TRUE Python TRUE Java FALSE c FALSE c++ TRUE Dart
>_ zenity — notification — window-icon=update.png — text “System update necessary!”
>_ find $HOME -name ‘*.ps’ | zenity — progress — pulsate
>_ zenity — notification — text=”$($(zenity — entry))”
By this command we can give linux command in entry box and the command output will show in notification.
And a lot of GTK. Graphical dialog can be build using zenity. For all knowledge take a read of zenity manual.