Create GUI dialogs in one line of code

Finding a Little Zen

© Lead Image © Martin Capek, 123RF.com

© Lead Image © Martin Capek, 123RF.com

Article from Issue 247/2021
Author(s):

The Zenity command-line utility lets you create simple dialog boxes with your own data or with the output of utilities and applications.

Zenity is a command-line GUI creator that has been around since 2012 and is pre-installed on most versions of Linux, including Raspberry Pis. Zenity isn't designed to be a high-level GUI development tool, but if you just need some basic scripting with dialogs, then Zenity might be a perfect fit.

I was amazed that in one line of Bash code I was able to show:

  • stats in a message dialog
  • a web page in a dialog
  • CSV data or SQL queries in a list dialog

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Zenity and KDialog

    Zenity and KDialog let you integrate your scripts with the native KDE or Gnome environment.

  • Xonsh

    Create lightweight Raspberry Pi scripts with Xonsh, a Python shell that lets you write scripts in Python with Bash commands mixed in.

  • Script Dialogs

    Starting a script on a Linux server with just a few mouse clicks sounds more complicated than it really is. If you want to create attractive and interactive dialogs for your desktop users, all you need is a small utility called SSH and a little Bash know-how.

  • Elixer

    The Elixir programming language on a Raspberry Pi lets you create distributed projects in just a few lines of code.

  • Tutorials – Shell Scripts

    Letting your scripts ask complex questions and give user feedback makes them more effective.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News