Table of Contents
In this article, I will introduce to you about zenity software – a tool that allows you to create simple GUi for bash scripts. The Zenity tool has a fairly simple command structure, and I’ll talk about those commands in later articles.
What is Zenity?
First, Zenity is a completely free cross-platform program. It allows you to create GTK + dialogs via command lines and shell scripts.
Zenity was originally developed by Sun Microsystems (I’ve read somewhere about this, probably on Wikipedia). Zenith is continuing to grow and operate with the maintainers LuisMedinas and ArxCruz.
This program can run cross platform on both Linux, Windows and Mac OSX. However, I see zenity only used on Linux is mainly. Zenity Homepage.

Install zenity
Zenity is installed by default or is available in the repositories of the current standard Linux operating system.
To check program zenity have on your pc or not, you run the following command:
zenity --versionIf the above command does not produce results as like this:
root@writebash ~ # zenity --version
3.18.1.1You can install zenity on Linux through the following command.
- For operating systems based on Debian (or Ubuntu):
sudo apt-get install zenity -y- For operating systems based on RedHat (or Fedora):
sudo yum install zenity -yTo display all the Zenity commands, type:
zenity --helpCreate GUI for Bash, why is Zenity?
Personally, I or you will find that language Bash is not a powerful language for programming graphical user interface.
Most of the current applications written with the language are strong and flexible such as: C, Java, Python.
Why is Zenity? The answer is very simple. This is because Zenity is very simple and it fully supports Bash scripts. However, Zenity’s versatility is not as good as professional GUI design tools.
Conclusion
In the next article, I will talk more about each type of dialog that Zenity supports. And at the end of this series about Zenity, I will guide you to write a small program completed using Zenity and Bash.
(This is an article from my old blog that has been inactive for a long time, I don’t want to throw it away so I will keep it and hope it helps someone).