ZENITY(1)

๐Ÿ’– NAME ๐Ÿ’–

okay bestie, welcome to the zenity(1) manual page โ€” User Commands section, zenity 4.2.2 edition. zenity โ€” manual page for zenity 4.2.2. periodt.


๐ŸŒธ DESCRIPTION ๐ŸŒธ

zenity is a program that displays GTK+ dialogs and returns the userโ€™s input โ€” either in the return code or on standard output. Itโ€™s giving โ€œlet your shell scripts talk to actual humansโ€ energy, and honestly? iconic. You can present information to the user and ask for information from the user from all manner of shell scripts.

For example, zenity --question will return either 0, 1, or 5, depending on whether the user pressed OK, Cancel, or timeout has been reached. And zenity --entry will output on standard output what the user typed into the text entry field. slay.

Comprehensive documentation is also available in the GNOME Help Browser. ๐Ÿซถ

Usage:

zenity [OPTION???]

Help Options:

  • -h, --help โ€” Show help options
  • --help-all โ€” Show all help options
  • --help-general โ€” Show general options
  • --help-calendar โ€” Show calendar options
  • --help-entry โ€” Show text entry options
  • --help-error โ€” Show error options
  • --help-info โ€” Show info options
  • --help-file-selection โ€” Show file selection options
  • --help-list โ€” Show list options
  • --help-notification โ€” Show notification options
  • --help-progress โ€” Show progress options
  • --help-question โ€” Show question options
  • --help-warning โ€” Show warning options
  • --help-scale โ€” Show scale options
  • --help-text-info โ€” Show text information options
  • --help-color-selection โ€” Show color selection options
  • --help-password โ€” Show password dialog options
  • --help-forms โ€” Show forms dialog options
  • --help-misc โ€” Show miscellaneous options

General options

  • --title=TITLE โ€” Set the dialog title
  • --width=WIDTH โ€” Set the width
  • --height=HEIGHT โ€” Set the height
  • --timeout=TIMEOUT โ€” Set dialog timeout in seconds
  • --ok-label=TEXT โ€” Set the label of the OK button
  • --cancel-label=TEXT โ€” Set the label of the Cancel button
  • --extra-button=TEXT โ€” Add an extra button
  • --modal โ€” Set the modal hint
  • --attach=WINDOW โ€” DEPRECATED; does nothing ๐Ÿ’€

Calendar options

  • --text=TEXT โ€” Set the dialog text
  • --day=DAY โ€” Set the calendar day
  • --month=MONTH โ€” Set the calendar month
  • --year=YEAR โ€” Set the calendar year
  • --date-format=PATTERN โ€” Set the format for the returned date

Text entry options

  • --text=TEXT โ€” Set the dialog text
  • --entry-text=TEXT โ€” Set the entry text
  • --hide-text โ€” Hide the entry text

Error options

  • --text=TEXT โ€” Set the dialog text
  • --icon=ICON-NAME โ€” Set the icon name
  • --no-wrap โ€” Do not enable text wrapping
  • --no-markup โ€” Do not enable Pango markup
  • --ellipsize โ€” Enable ellipsizing in the dialog text. This fixes the high window size with long texts

Info options

  • --text=TEXT โ€” Set the dialog text
  • --icon=ICON-NAME โ€” Set the icon name
  • --no-wrap โ€” Do not enable text wrapping
  • --no-markup โ€” Do not enable Pango markup
  • --ellipsize โ€” Enable ellipsizing in the dialog text. This fixes the high window size with long texts

File selection options

  • --filename=FILENAME โ€” Set the filename
  • --multiple โ€” Allow multiple files to be selected
  • --directory โ€” Activate directory-only selection
  • --save โ€” Activate save mode
  • --separator=SEPARATOR โ€” Set output separator character
  • --file-filter=NAME | PATTERN1 PATTERN2 ... โ€” Set a filename filter
  • --confirm-overwrite โ€” DEPRECATED; does nothing ๐Ÿ™ˆ

List options

  • --text=TEXT โ€” Set the dialog text
  • --column=COLUMN โ€” Set the column header
  • --checklist โ€” Use check boxes for the first column
  • --radiolist โ€” Use radio buttons for the first column
  • --imagelist โ€” Use an image for the first column
  • --separator=SEPARATOR โ€” Set output separator character
  • --multiple โ€” Allow multiple rows to be selected
  • --editable โ€” Allow changes to text
  • --print-column=NUMBER โ€” Print a specific column (Default is 1. 'ALL' can be used to print all columns)
  • --hide-column=NUMBER โ€” Hide a specific column
  • --hide-header โ€” Hide the column headers
  • --mid-search โ€” DEPRECATED; does nothing ๐Ÿ˜ญ

Notification options

  • --text=TEXT โ€” Set the notification text
  • --icon=ICON-NAME โ€” Set the icon name
  • --listen โ€” Listen for commands on stdin
  • --hint=TEXT โ€” DEPRECATED; does nothing ๐Ÿ’€

Progress options

  • --text=TEXT โ€” Set the dialog text
  • --percentage=PERCENTAGE โ€” Set initial percentage
  • --pulsate โ€” Pulsate progress bar
  • --auto-close โ€” Dismiss the dialog when 100% has been reached
  • --auto-kill โ€” Kill parent process if Cancel button is pressed
  • --no-cancel โ€” Hide Cancel button
  • --time-remaining โ€” Estimate when progress will reach 100%

Question options

  • --text=TEXT โ€” Set the dialog text
  • --icon=ICON-NAME โ€” Set the icon name
  • --no-wrap โ€” Do not enable text wrapping
  • --no-markup โ€” Do not enable Pango markup
  • --default-cancel โ€” Give Cancel button focus by default
  • --ellipsize โ€” Enable ellipsizing in the dialog text. This fixes the high window size with long texts
  • --switch โ€” Suppress OK and Cancel buttons

Warning options

  • --text=TEXT โ€” Set the dialog text
  • --icon=ICON-NAME โ€” Set the icon name
  • --no-wrap โ€” Do not enable text wrapping
  • --no-markup โ€” Do not enable Pango markup
  • --ellipsize โ€” Enable ellipsizing in the dialog text. This fixes the high window size with long texts

Scale options

  • --text=TEXT โ€” Set the dialog text
  • --value=VALUE โ€” Set initial value
  • --min-value=VALUE โ€” Set minimum value
  • --max-value=VALUE โ€” Set maximum value
  • --step=VALUE โ€” Set step size
  • --print-partial โ€” Print partial values
  • --hide-value โ€” Hide value

Text information options

  • --filename=FILENAME โ€” Open file
  • --editable โ€” Allow changes to text
  • --font=TEXT โ€” Set the text font
  • --checkbox=TEXT โ€” Enable an I read and agree checkbox
  • --auto-scroll โ€” Auto scroll the text to the end. Only when text is captured from stdin

Color selection options

  • --color=VALUE โ€” Set the color
  • --show-palette โ€” Show the palette

Password dialog options

  • --username โ€” Display the username option

Forms dialog options

  • --add-entry=Field name โ€” Add a new Entry in forms dialog
  • --add-password=Field name โ€” Add a new Password Entry in forms dialog
  • --add-multiline-entry=Field name โ€” Add a new multi-line entry in forms dialog (Since: 4.2)
  • --add-calendar=Calendar field name โ€” Add a new Calendar in forms dialog
  • --add-list=List field and header name โ€” Add a new List in forms dialog
  • --list-values=List of values separated by | โ€” List of values for List
  • --column-values=List of values separated by | โ€” List of values for columns
  • --add-combo=Combo box field name โ€” Add a new combo box in forms dialog
  • --combo-values=List of values separated by | โ€” List of values for combo box
  • --show-header โ€” Show the columns header
  • --text=TEXT โ€” Set the dialog text
  • --separator=SEPARATOR โ€” Set output separator character
  • --forms-date-format=PATTERN โ€” Set the format for the returned date

Miscellaneous options

  • --about โ€” About zenity
  • --version โ€” Print version

Application Options:

  • --calendar โ€” Display calendar dialog
  • --entry โ€” Display text entry dialog
  • --error โ€” Display error dialog
  • --info โ€” Display info dialog
  • --file-selection โ€” Display file selection dialog
  • --list โ€” Display list dialog
  • --notification โ€” Display notification
  • --progress โ€” Display progress indication dialog
  • --question โ€” Display question dialog
  • --warning โ€” Display warning dialog
  • --scale โ€” Display scale dialog
  • --text-info โ€” Display text information dialog
  • --color-selection โ€” Display color selection dialog
  • --password โ€” Display password dialog
  • --forms โ€” Display forms dialog

โœจ EXAMPLES โœจ

Display a file selector with the title Select a file to remove. The file selected is returned on standard output. bestie, itโ€™s literally that easy:

zenity  --title="Select a file to remove" --file-selection

Display a text entry dialog with the title Select Host and the text Select the host you would like to flood-ping. The entered text is returned on standard output. no cap:

zenity  --title "Select Host" --entry --text "Select the host you would like to flood-ping"

Display a dialog, asking Microsoft Windows has been found! Would you like to remove it?. The return code will be 0 (true in shell) if OK is selected, and 1 (false) if Cancel is selected. iconic behavior:

zenity  --question --title "Alert"  --text "Microsoft Windows has been found! Would you like to remove it?"

Show the search results in a list dialog with the title Search Results and the text Finding all header files.... ๐ŸŒธ:

find . -name '*.h' | zenity --list --title "Search Results" --text "Finding all header files.." --column "Files"

Show a passive notification ๐Ÿฆ‹:

zenity --notification --icon=software-update-available --text "System update necessary!"

Display a weekly shopping list in a check list dialog with Apples and Oranges pre selected ๐Ÿ“:

zenity --list --checklist --column "Buy" --column "Item" TRUE Apples TRUE Oranges FALSE Pears FALSE Toothpaste

Display a progress dialog while searching for all the postscript files in your home directory ๐Ÿ”ฅ:

find $HOME -name '*.ps' | zenity --progress --pulsate

๐Ÿ’– AUTHOR ๐Ÿ’–

okay so the lore ๐Ÿซถ โ€” Zenity was originally written by Glynn Foster <glynn.foster@sun.com>. iconic behavior, honestly ๐Ÿ‘‘. and since then? it's been maintained by a number of contributors โ€” a whole squad, no cap ๐Ÿงš.

this manual page was originally written by Ross Burton <ross@burtonini.com> ๐ŸŒธ. and bestie, here's the fun part: it currently contains portions which are automatically generated, plus other portions written by its original author โœจ. so it's like, a collab. iykyk ๐Ÿ’….


๐Ÿ” SEE ALSO ๐Ÿ‘€

  • dialog(1) โ€” yeah go look at that one too, bestie ๐Ÿฆ‹

so that's the whole thing, fr fr ๐Ÿ’œ go make some cute little dialogs and slay โœจ

and before you close the tab ๐ŸŽ€ โ€” this beauty is zenity 4.2.2, dated March 2026, from the source page ZENITY(1) ๐Ÿ’– okay bye ily have fun ๐Ÿ’…๐ŸŒธ

๐Ÿ“ฆ where this page comes from