Zenity Command in Linux

saurabh kharkate
2 min readSep 24, 2021

What is Zenity?

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.

There are other alternatives, but nothing compares to the simplicity of Zenity, specially when you don’t need complex programming.

Zenity Features

  1. Cross Platform Application
  2. Allow GTK+ Dialog Box Execution
  3. Command Line Tool
  4. Support in Shell Scripting

Usefulness

  1. Easy GUI Creation
  2. Less features than other complex Tools
  3. Enables shell scripts to interact with a GUI users
  4. Simple dialog creation is possible for graphical user interaction

Let’s See some examples on the Zenity command

# man Zenity
  • entry
    Display text entry dialog
# zenity --entry
  • error
    Display error dialog
# zenity --error --text "task not completed yet..."
  • progress for progress bar
#zenity --progress --text "Upadating..." --width=500
  • Scale Dialog
  • You can explore more about Zenity by using command :
# zenity --help

Hope you like the blog and is helpful to you ! Thanks for your time :)

Keep Sharing !!! Keep Learning!!!!

--

--