Dialog or zenity

dialogguizenity

I am working on a project. I have two options for the GUI part.

Either use dialog or zenity.

I never used any of these tools before. I have to learn one of them. Suggest me which one should I learn and which will be more beneficial to learn? Which one is old and which one is new? Which one will you prefer?

Best Answer

It really depends on what you are trying to accomplish.

  • Dialog creates curses-based text dialog boxes that are accessible from the console. This is useful for adding some level of interaction to shell scripts. Dialog is older than the hills but still has its uses.

  • Zenity creates GTK-based graphical dialog boxes for use in a windowed GUI environment. This is useful for adding a few graphical touches to something that is running as a script but the user didn't run it from a text console and it needs some interaction. Zenity is a relatively new player but since it's distributed with Gnome it's widely available and stable.

There are of course other use-cases but the two tools are so fundamentally different that it's up to you to decide what you are trying to accomplish, then one tool or the other will be an obvious choice.

Related Question