Xdialog(1)

πŸ“¦ version 2.3.1, in fedora 43, fedora 44

πŸŽ€ 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, icon or text πŸ”˜

🧁 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, --textbox and --editbox πŸ”€
  • --password | --password=1|2 β€” this one may be repeated 2 or 3 times before --2inputsbox or --3inputsbox πŸ”. You can also specify one (and only one) password field with the --password=1|2 syntax.
  • --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, --checklist and --radiolist πŸ™ˆ
  • --item-help β€” when you use this, the <helpN> parameters of --menubox, --checklist, --radiolist, --buildlist and --treeview must be specified. If --item-help is 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 --tailbox and --logbox πŸ™…
  • --no-cancel β€” may be used with all but --infobox, --gauge and --progress ❌
  • --no-buttons β€” may be used with --textbox, --tailbox, --logbox, --infobox, --fselect and --dselect πŸ«₯
  • --default-no β€” may be used with all widgets with a "Cancel" or "No" button. Note that it's ignored when the --wizard option is in force πŸ™ƒ
  • --wizard β€” may be used with all but --msgbox, --infobox, --gauge and --progress πŸ§™
  • --help <help> β€” may be used with all but --infobox, --gauge and --progress πŸ†˜
  • --print <printer> β€” for use with --tailbox, --textbox and --editbox πŸ–¨οΈ
  • --check <label> [<status>] β€” may be used with all but --infobox, --gauge and --progress β˜‘οΈ
  • --ok-label <label> β€” may be used with all widgets with an "OK" or "Yes" button. Note that it's ignored when the --wizard option 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 --wizard option 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 --infobox and --gauge 🫠
  • --smooth β€” for use with --tailbox and --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 (or 0x0) is passed to Xdialog, the widget is auto-sized by GTK+ πŸͺ„
    • when a size of -1 -1 (or -1x-1) is passed, the Xdialog widget 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 --begin transient option (when the size is given in characters) or with a "-geometry"-like origin, e.g. 400x200+20-30 πŸ“
  • 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 --left common option becomes the default justification instead of --center πŸ“
  • <text> wrapping is always on (that's --wrap) and the --fill option gets ignored, so don't even bother πŸ™ˆ
  • the --no-cr-wrap common 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_AUTOSIZE to 1 or true ✨ 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_TIMEOUT is set (in 1/1000s) and greater than 0. in that case you get a real infobox with no button 🌈
  • the --version special 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