GNU Linux, the operating system built on very powerful Kernel called Linux. Linux is famous for its command Line operations. With the invent of Linux in day-to-day and Desktop computing, nix remains no more biased towards command-Line, it is equally Graphical and developing Graphical application remains no more a difficult task.

Zenity Display Graphical Boxes

Here in this article we will be discussing creation and execution of simple Graphical Dialog box using GTK+ application called “Zenity“.

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, a tool you must have your hands on.

Zenity Features

FOSS Software

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.

Installation of Zenity in Linux

Zentity is by default installed or available in repository of most of the Standard Linux distribution of today. You can check if is installed onto your machine or not by executing following commands.

8. A Password Dialog

9. A Form Dialog box

10. An about Dialog

Create Shell Script Dialog

Now we would be discussing Zenity Dialog creation using simple shell scripts here. Although we can create single Dialog by executing Zenity commands directly from the shell (as we did above) but then we can’t link two Dialog boxes in order to obtain some meaningful result.

How about an interactive dialog box which takes input from you, and shows the result.

In the next article we would be integrating Zenity with more shell script for GUI user interaction. Till then stay tuned and connected to Tecmint. Don’t forget to give your valuable feedback in comment section.

11 Responses

I am still fairly new to the Linux world. I’m using Ubuntu 16.10 and Gnome. I REALLY appreciate useful and informative articles such as this one both here at Tecmint and other, similar sites around the ‘net.

Look, I don’t like to be a nodge, and I’m not really a grammar Nazi, but there are some significant problems with the grammar in this piece. I’m also acutely aware that we did not all grow up with English as our native tongue, but don’t all of you at Tecmint think someone should proofread your article before you post them?

Alternatively, there are some very good to excellent grammar checking tools now available, many of which are free. I’m just sayin’ this because what you all write is great and I don’t want anyone thinking less of your works because of poor grammar or spelling, ‘K?