Dialog: An Introductory Tutorial
There are several more things that dialog can do. You can create and use a dialogrc file to customize the color and appearance of the dialog boxes. Dialog also supports displays that do not provide color or graphics characters. The details are given in the man page.
Dialog is “8-bit clean”, meaning that that international character sets other than the standard US ASCII are supported.
For some longer examples of using dialog you can look at the sample scripts included with the dialog source code. Under Slackware Linux, the system configuration scripts can be found in /usr/lib/setup.
There are undoubtedly many possible uses for dialog. You could, for example, create a fully menu-driven interface for Linux users not familiar with shell commands. This could even be expanded into a simple bulletin board system that allowed users to read mail and Usenet news, edit files, etc.
The example sound driver script could be expanded into a tool for configuring all of the kernel compile options.
Incidently, dialog is reasonably portable and should run with minimal changes on any Unix-compatible system that has a curses library. It can also be used from any shell script language.
Dialog is a simple yet powerful utility, true to the Unix tradition of making each tool do one thing well. It can add a polished look to your applications and make them easier to use.
Thank you to Savio Lam, the author of the dialog package, Stuart Herbert, who updated dialog to version 0.4, and Patrick Volkerding, who wrote the dialog-based setup scripts in the Slackware Linux distribution.
(Jeff_Tranter@mitel.com) is a software designer for a high-tech telecommunications company in Kanata, Canada. He bought a PC just over 18 months ago in order to run Linux and has not looked back since. He is the author of Linux Sound and CD-ROM HOWTO documents.
Practical books for the most technical people on the planet. Newly available books include:
- Agile Product Development by Ted Schmidt
- Improve Business Processes with an Enterprise Job Scheduler by Mike Diehl
- Finding Your Way: Mapping Your Network to Improve Manageability by Bill Childers
- DIY Commerce Site by Reven Lerner
Plus many more.
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Happy GPL Birthday VLC!
- Unikernels, Docker, and Why You Should Care
- Handheld Emulation: Achievement Unlocked!
- Controversy at the Linux Foundation
- Giving Silos Their Due
- Don't Burn Your Android Yet
- Firefox OS
- Wine 1.8 Released