Xdialog(1)
π Xdialog(1): X11/tool manual π
β¨ NAME β¨
Xdialog - (c)dialog replacement for X-Windows π
β¨ SYNTAX β¨
Xdialog [<common options>] [<transient options>] <box option> ...
and:
Xdialog <special option>
π DESCRIPTION π
Okay so Xdialog is designed to be a drop-in replacement for the dialog and cdialog programs π
(BTW Xdialog may also be used in place of gdialog, iykyk). It takes any terminal-based program and gives it a full glow-up into an X-windows interface π¦. The dialogs are easier to see and use, and the new widgets add even more functionality β¨. It's giving upgrade, no cap.
To pull this off, Xdialog uses the Gimp ToolKit (also known as GTK+) π οΈ. Lowkey, that's the engine behind the whole glow-up π«Ά.
π OPTIONS π
The [<common options>] [<transient options>] <box option> sequence can be repeated several times in the same Xdialog command line. This is called dialog chaining π. The common and transient options are optional, but there must always be a box option as the last Xdialog option, bestie π.
πΈ Common options πΈ
The <common options> are the ones that hang over every following <box options> until you hit the same or opposite <common options> on the command line. They're mostly about menu look, style, placement and behaviour, so basically the whole aesthetic π
.
Here's the full list, bestie:
--wmclass <name>β takes a name π·οΈ--rc-file <gtkrc filename>β takes a gtkrc filename π--backtitle <backtitle>β takes a backtitle π--title <title>β takes a title π·--allow-close | --no-closeβ pick one: allow close or no close πͺ--screen-center | --under-mouse | --auto-placementβ three placement vibes, pick one π--center | --right | --left | --fillβ four layout options, pick one β¨--no-wrap | --wrapβ wrap or no wrap π--cr-wrap | --no-cr-wrapβ another wrap pair, pick one π--stderr | --stdoutβ choose where the results go, stderr or stdout π¬ (more on that in DIAGNOSTICS π)--separator <character> | --separate-outputβ takes a character βοΈ, or use the separate-output one instead--buttons-style default|icon|textβ pick a button style:default,iconortextπ
π§ Transient options π§
The <transient options> only apply to the next <box option> on the command line. These are for tuning the widgets (number and type of buttons, menu icon) or triggering some of the widgets' specific features π.
Available transient options:
--fixed-fontβ for use with--tailbox,--textboxand--editboxπ€--password | --password=1|2β this one may be repeated 2 or 3 times before--2inputsboxor--3inputsboxπ. You can also specify one (and only one) password field with the--password=1|2syntax.--editableβ for use with--comboboxβοΈ--time-stamp | --date-stampβ for use with--logboxβ°--reverseβ for use with--logboxπ--keep-colorsβ for use with--logboxπ--interval <timeout>β may be used with input(s) boxes, combo box, range(s) boxes, spin(s) boxes, list boxes, menu box, treeview, calendar and timebox widgets π«§--timeout <timeout>(in seconds) β may be used with all but infobox, gauge and progress widgets β³--no-tagsβ for use with--menubox,--checklistand--radiolistπ--item-helpβ when you use this, the<helpN>parameters of--menubox,--checklist,--radiolist,--buildlistand--treeviewmust be specified. If--item-helpis not specified, they must be omitted π§©--default-item <tag>β for use with--menuboxπ―--icon <xpm filename>β for use with any widget accepting a<text>parameter πΌοΈ--no-okβ for use with--tailboxand--logboxπ--no-cancelβ may be used with all but--infobox,--gaugeand--progressβ--no-buttonsβ may be used with--textbox,--tailbox,--logbox,--infobox,--fselectand--dselectπ«₯--default-noβ may be used with all widgets with a "Cancel" or "No" button. Note that it's ignored when the--wizardoption is in force π--wizardβ may be used with all but--msgbox,--infobox,--gaugeand--progressπ§--help <help>β may be used with all but--infobox,--gaugeand--progressπ--print <printer>β for use with--tailbox,--textboxand--editboxπ¨οΈ--check <label> [<status>]β may be used with all but--infobox,--gaugeand--progressβοΈ--ok-label <label>β may be used with all widgets with an "OK" or "Yes" button. Note that it's ignored when the--wizardoption is in force π₯³--cancel-label <label>β may be used with all widgets with a "Cancel" or "No" button. Note that it's ignored when the--wizardoption is in force π³οΈ--beepβ may be used with all widgets π--beep-afterβ may be used with all widgets π--begin <Yorg> <Xorg>β may be used with all widgets π--ignore-eofβ may be used with--infoboxand--gaugeπ«--smoothβ for use with--tailboxand--logboxπ§
π Box options π
The <box option> tells Xdialog which widget to show, and it's followed by three or more parameters:
- the first parameter is a text string or a filename (this depends on the box option) π
- the second and third parameters are menu
<height>and<width>in characters. These two can be swapped out for a single<XSIZExYSIZE>parameter, which gives the width and height in pixels π- when a size of
0 0(or0x0) is passed toXdialog, the widget is auto-sized by GTK+ πͺ - when a size of
-1 -1(or-1x-1) is passed, theXdialogwidget is set to the maximum size so it fits the screen π₯οΈ - you can give the widget an absolute origin on the screen (provided your window manager lets you do so), either with the
--begintransient option (when the size is given in characters) or with a "-geometry"-like origin, e.g.400x200+20-30π
- when a size of
- some box options need extra parameters such as tags, menu items, labels or default values π·οΈ
Available box options:
--yesno <text> <height> <width>β the yes/no box, the classic π€·--msgbox <text> <height> <width>β message box π£--infobox <text> <height> <width> [<timeout>]β info box βΉοΈ, with an optional timeout--gauge <text> <height> <width> [<percent>]β gauge with an optional percent π--progress <text> <height> <width> [<maxdots> [[-]<msglen>]]β progress box with dots πΎ--inputbox <text> <height> <width> [<init>]β text input box β¨οΈ, with an optional initial value--2inputsbox <text> <height> <width> <label1> <init1> <label2> <init2>β two input fields π―--3inputsbox <text> <height> <width> <label1> <init1> <label2> <init2> <label3> <init3>β three input fields π«--combobox <text> <height> <width> <item1> ... <itemN>β combo box π--rangebox <text> <height> <width> <min value> <max value> [<default value>]β range box ποΈ--2rangesbox <text> <height> <width> <label1> <min1> <max1> <def1> <label2> <min2> <max2> <def2>β two range boxes in one ποΈποΈ--3rangesbox <text> <height> <width> <label1> <min1> <max1> <def1> <label2> <min2> <max2> <def2> <label3> <min3> <max3> <def3>β three ranges, the whole set π--spinbox <text> <height> <width> <min> <max> <def> <label>β spin box π--2spinsbox <text> <height> <width> <min1> <max1> <def1> <label1> <min2> <max2> <def2> <label2>β two spin boxes ππ--3spinsbox <text> <height> <width> <min1> <max1> <def1> <label1> <min2> <max2> <def2> <label2> <min3> <max3> <def3> <label3>β three spin boxes, triple the spin πͺοΈ--textbox <file> <height> <width>β text box for reading a file π--editbox <file> <height> <width>β edit box for a file βοΈ--tailbox <file> <height> <width>β tail box for a file π--logbox <file> <height> <width>β log box ποΈ--menubox <text> <height> <width> <menu height> <tag1> <item1> {<help1>}...β menu box π--checklist <text> <height> <width> <list height> <tag1> <item1> <status1> {<help1>}...β checklist β--radiolist <text> <height> <width> <list height> <tag1> <item1> <status1> {<help1>}...β radio list π--buildlist <text> <height> <width> <list height> <tag1> <item1> <status1> {<help1>}...β build list π§±--treeview <text> <height> <width> <list height> <tag1> <item1> <status1> <item_depth1> {<help1>}...β treeview π³--fselect <file> <height> <width>β file selector π--dselect <directory> <height> <width>β directory selector ποΈ--colorsel <text> <height> <width> [<red> <green> <blue>]β colour picker π¨--fontsel <font name> <height> <width>β font picker π€--calendar <text> <height> <width> [<day> <month> <year>]β calendar π--timebox <text> <height> <width> [<hours> <minutes> <seconds>]β time box β°
πͺ Special options πͺ
The <special options> take no parameter and need to be used alone on the command line. They just print a string to stderr and exit immediately with a 0 exit code π«Ά.
Available special options:
--versionβ prints the version number to stderr and exits π’--print-versionβ same as above, but in a cdialog-compatible way π§--print-maxsizeβ prints the maximum menu size in characters and exits π
β¨ ENVIRONMENT VARIABLES β¨
okay bestie, this section is where you get to flip Xdialog into a totally different mode π πΈ
XDIALOG_HIGH_DIALOG_COMPAT
so if you set this to 1 or true (case doesn't matter, we're not gatekeeping π«Ά), you turn on the (c)dialog high compatibility mode π¦ and honestly the glow-up is real. Here's what changes:
- everything uses a fixed (monospacing) font π, including labels, tags, menu/list items, and buttons. no cap, it's giving typewriter energy β¨οΈ
- the
--leftcommon option becomes the default justification instead of--centerπ <text>wrapping is always on (that's--wrap) and the--filloption gets ignored, so don't even bother π- the
--no-cr-wrapcommon option becomes the default instead of--cr-wrapπ (but it does NOT apply to the<backtitle>, so that one's still doing its own thing π§) - the auto-sizing feature gets forced no matter what box size you asked for, but only if you also set
XDIALOG_FORCE_AUTOSIZEto1ortrueβ¨ this is the fix for menus that are lowkey too cramped, like when your box is too small to fit all the menu/list entries you gave it π - the Cancel button disappears from the tailbox and textbox widgets π
- the infobox widget turns into a msgbox unless
XDIALOG_INFOBOX_TIMEOUTis set (in 1/1000s) and greater than0. in that case you get a real infobox with no button π - the
--versionspecial option returns the same string as--print-versionπ
XDIALOG_FORCE_AUTOSIZE
XDIALOG_INFOBOX_TIMEOUT
these two are part of the XDIALOG_HIGH_DIALOG_COMPAT glow-up, so check the notes above for the full tea βπ
XDIALOG_NO_GMSGS
if you set this to 1, the Gdk, GLib, and Gtk libraries stop emitting messages through g_log() π€«π«Ά quiet vibes only
β¨ EXAMPLES β¨
sample scripts live in the /usr/share/doc/xdialog-2.3.1/samples/ directory ππ§
and the full HTML doc, with screen shots, examples, and FAQ, is in the /usr/share/doc/xdialog-2.3.1/ directory πΈπ¦
β¨ AUTHORS β¨
- Thierry Godefroy <xdialog@free.fr> β the queen, from v1.1.0 onwards ππ
- Alfred Reynolds <alfred@cyberone.com.au> β the OG, v1.0 only πΈ
β¨ SEE ALSO β¨
dialog(1),cdialog(1)β the besties you should go check out next π«Άπ
Thierry Godefroy, version 2.3.1, Xdialog(1) π that's the whole page, bestie. you're officially dialog-brained now ππ
π¦ where this page comes from
- fedora 43: xdialog 2.3.1-40.fc43 Β· GPL-1.0-or-later
- fedora 44: xdialog 2.3.1-41.fc44 Β· GPL-1.0-or-later
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms