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.
- « first
- ‹ previous
- 1
- 2
- 3
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
| Dart: a New Web Programming Experience | May 07, 2013 |
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- RSS Feeds
- Trying to Tame the Tablet
- New Products
- What's the tweeting protocol?
- Dart: a New Web Programming Experience
- Drupal is an Awesome CMS and a Crappy development framework
2 hours 43 min ago - IT industry leaders
5 hours 6 min ago - Reply to comment | Linux Journal
21 hours 54 min ago - Reply to comment | Linux Journal
1 day 27 min ago - Reply to comment | Linux Journal
1 day 1 hour ago - great post
1 day 2 hours ago - Google Docs
1 day 2 hours ago - Reply to comment | Linux Journal
1 day 7 hours ago - Reply to comment | Linux Journal
1 day 8 hours ago - Web Hosting IQ
1 day 9 hours ago
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




Comments
Dialog Not displaying correctly
Hi Guys,
I'm writing an application using dialog for a production machine that does not have any window managers or desktops installed. My development environment has a gnome desktop and the terminal window seems to display dialogs correctly, but when I copy the script to the production environment, the display is misaligned and does not look as neat as what I see in the development environment.
I've tested the application on the production machine in a telnet session from my development machine, and then it displays correctly, so I can only assume that something is wrong with the terminal settings on the actual production environment.
Both operating systems are exactly the same. Do I need to change any terminal settings or configurations to make the dialogs display correctly?
Thanks
using dialog in Red hat Linux or SUSE linux
How do i use the dialog facility on Red Hat Linux and/or SUSe Linux. can you give a link where one can download the package
Standard Package Manger
You should be able to find them in the standard repositories using the standard package managers. On SuSE use zypper (or yast). On Red Hat use yum. From a shell prompt do:
Mitch Frazier is an Associate Editor for Linux Journal.
corrections
The lines:
dialog --title "Message" --yesno "Are you having\ fun?" 6 25
dialog --menu "Choose one:" 10 30 3 1 red 2 green\ 3 blue
should read:
dialog --title "Message" --yesno "Are you having fun?" 6 25
dialog --menu "Choose one:" 10 30 3 1 red 2 green 3 blue
the backslash is only needed to escape a new-line character for commands written over multiple shell command-lines. There are other occurences of this type of error in the article. This may have occured because of the web content software used on this site causing lines to be concatenated.
Check out the `Xdialog` package (http://xdialog.dyns.net/), which is a drop-in replacement for `dialog`, but does the same thing for an X Window GUI environment. Also, newer versions of `dialog` are sometimes referred to as `cdialog` (http://freshmeat.net/projects/cdialog/).
HTH.