How To Create a Custom Linux App Menu — Zenity Makes It Easy

Zenity
(Image credit: Tom's Hardware, Pexels)

Creating GUI (Graphical User Interfaces) with any operating system boils down to Ncurses / Whiptail type GUIs for the terminal, or full blown GUIs on the desktop. We will be building the latter, but using the terminal to run commands. Zenity, a tool to display GTK dialog boxes from the terminal and shell scripts is a great tool and it is very easy to use.

In this how-to, we will create a simple application launcher using a Bash script. Selecting an application will trigger the terminal command and open the application. Leaving our app launcher ready to run another application.

Zenity is a fantastic tool for creating GUI applications via the terminal and the Zenity project has a full manual on how to use it.
There are alternatives, in the form of Yad (Yet Another Dialog). We tested Yad ahead of this how to, but found that Zenity provided a more robust means to create menu. The syntax between the two is very similar and you are free to try out both to find your favorite.

Latest Videos FromTom's Hardware
Les Pounder
Associate Editor

Les Pounder is an associate editor at Tom's Hardware. He is a creative technologist and for seven years has created projects to educate and inspire minds both young and old. He has worked with the Raspberry Pi Foundation to write and deliver their teacher training program "Picademy".