Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
    
Just a note about a bug (avoidable) in zenity, see this Unix-&-Linux question –  Peter.O Aug 22 '11 at 13:35
add comment

1 Answer

up vote 7 down vote accepted

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 it's 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 is 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.