Zenity display text in message dialog

Share this post to your friends !

This entry is part 12 of 13 in the series GUI for bash script using Zenity

WriteBash - Zenity supports a number of message types. This article will guide you through these types of messages. To make the message dialog very simple, just use the --text option with the message type option.

The dialog dialog dialog supports the following four message types:

  • Information
  • Question
  • Warning
  • Error

Create an information dialog

To create the information dialog, use the following command:

zenity --info --text="WriteBash.com demo info message dialog"

And see the result as image below.

zenity-display-text-in-message-dialog-01 Zenity display text in message dialog
An information dialog.

Create a question dialog

To create a question dialog, use the following command:

zenity --question --text="Do you like WriteBash blog?"

And see the result as image below.

zenity-display-text-in-message-dialog-02 Zenity display text in message dialog
A question dialog.

Create a warning dialog

Read moreCreate a form dialog.

Use the following command to create a warning dialog:

zenity --warning --text="WriteBash.com demo a warning message"

And see the result as image below.

zenity-display-text-in-message-dialog-03 Zenity display text in message dialog
A warning dialog.

Create an error dialog

Use the following command to create an error dialog:

zenity --error --text="WriteBash demo an error message"

And see the result as image below.

zenity-display-text-in-message-dialog-04 Zenity display text in message dialog
An error dialog.

Conclusion

Through this article, you can create simple message dialogs. Supports 4 types of message dialog, you can use it flexibly. And I think that these dialogs will be used a lot in your program.

Continue reading the series«« Previous part: Zenity create a text entry dialogNext part: Zenity create a text information dialog »»
If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.


Share this post to your friends !
If you appreciate what we share in this blog, you can support us by:
  1. Stay connected to: Facebook | Twitter | Google Plus | YouTube
  2. Subscribe email to recieve new posts from us: Sign up now.
  3. Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
  4. Become a Supporter - Make a contribution via PayPal.
  5. Support us by purchasing Ribbon Lite Child theme being using on this website.

We are thankful for your support.

single post bottom banner
«« »»

Got something to say? Join the discussion

Please keep in mind that all comments are subject to our Comment Policy. Your email address will not be published.
This site uses Akismet to reduce spam. Learn how your comment data is processed.