![]() |
(on Wikipedia)
https://invisible-island.net/dialog/
A program to present a commandline dialog, letting a scripter get user input.
Capable enough for everyday scripts. Capable enough that to get a "GUI" dialog, I would rather spawn a terminal and use dialog
.
- cat
- The shell builtin
read
. - A GUI option would be Xdialog.
-
I think it's hilarious there are so many nice screenshots of a text program.
- 2018-05-15 - 1.2-20140911 on Devuan-1.0.0-jessie-i386-DVD
- 2016-03-28 - (version not recorded) on Slackware 14.1
- 2016-03-26 - 1.2-20130928 on Lubuntu 14.04.4 LTS
- 2009-03-25 - 0.9b-20040421 on (distribution not recorded)
-
Dialog has come with probably every Linux distribution I've ever used.
Examples ∞
For a GUI popup, you don't need xdialog, zenity or the like. Use your GUI terminal, with some sort of --command
and pass your dialog command to it. Examples:
- gui-yesno-dialog.sh
-
For complex code, you can probably add it into some external file, and then do something like the following (example is urxvt):
\urxvt -e script.sh
Resources ∞
- https://www.linuxjournal.com/article/2460
- https://hightek.org/projects/dialog/ [ 1 ] was http://hightek.org/dialog/
Alternatives ∞
- YAD - a fork of Zenity with some dependencies removed.
- Wenity
- ratmen is a keyboard-based menu
- ratmenu may be a good choice for a general menu.
"Whiptail" ∞
Damn Small Linux has "Whiptail"
I can't find a homepage for it: forum thread
This is basically a smaller version of Dialog with fewer features.
It provides a way to create a keyboard-driven interface within shell scripts that can be used either in the Linux console or an X terminal. An example of its use in Damn Small Linux is it's xsetup.sh
Most of the DSL-specific GUI tools were created by Robert using murgaLua. This is essentially a version of Lua which includes FLTK widgets and a few other features. With murgaLua you can create "normal" text-based Lua scripts, as well as X-based FLTK interfaces that are controlled by Lua.
The official murgaLua release includes Fluid, which is a graphical tool used to create FLTK interfaces, and a lua script that converts the C++ output of Fluid into a Lua script that can be interpreted by murgaLua.
Footnotes
Last updated 2020-06-20 at 12:32:55
Slight cleanup, now that I've figured out how to create a simple menu.
ported, and included alternatives