Scroll to navigation

ZENITY(1) User Commands ZENITY(1)

NAME

zenity - manual page for zenity 4.0.1

DESCRIPTION

zenity is a program that will display GTK+ dialogs, and return (either in the return code, or on standard output) the users input. This allows you to present information, 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. zenity --entry will output on standard output what the user typed into the text entry field.

Comprehensive documentation is also available in the GNOME Help Browser.

Usage:

zenity [OPTION?]

Help Options:

Show help options
Show all help options
Show general options
Show calendar options
Show text entry options
Show error options
Show info options
Show file selection options
Show list options
Show notification options
Show progress options
Show question options
Show warning options
Show scale options
Show text information options
Show color selection options
Show password dialog options
Show forms dialog options
Show miscellaneous options

General options

Set the dialog title
Set the width
Set the height
Set dialog timeout in seconds
Set the label of the OK button
Set the label of the Cancel button
Add an extra button
Set the modal hint
DEPRECATED; does nothing

Calendar options

Set the dialog text
Set the calendar day
Set the calendar month
Set the calendar year
Set the format for the returned date

Text entry options

Set the dialog text
Set the entry text
Hide the entry text

Error options

Set the dialog text
Set the icon name
Do not enable text wrapping
Do not enable Pango markup
Enable ellipsizing in the dialog text. This fixes the high window size with long texts

Info options

Set the dialog text
Set the icon name
Do not enable text wrapping
Do not enable Pango markup
Enable ellipsizing in the dialog text. This fixes the high window size with long texts

File selection options

Set the filename
Allow multiple files to be selected
Activate directory-only selection
Activate save mode
Set output separator character
Set a filename filter
DEPRECATED; does nothing

List options

Set the dialog text
Set the column header
Use check boxes for the first column
Use radio buttons for the first column
Use an image for the first column
Set output separator character
Allow multiple rows to be selected
Allow changes to text
Print a specific column (Default is 1. 'ALL' can be used to print all columns)
Hide a specific column
Hide the column headers
DEPRECATED; does nothing

Notification options

Set the notification text
Set the icon name
Listen for commands on stdin
DEPRECATED; does nothing

Progress options

Set the dialog text
Set initial percentage
Pulsate progress bar
Dismiss the dialog when 100% has been reached
Kill parent process if Cancel button is pressed
Hide Cancel button
Estimate when progress will reach 100%

Question options

Set the dialog text
Set the icon name
Do not enable text wrapping
Do not enable Pango markup
Give Cancel button focus by default
Enable ellipsizing in the dialog text. This fixes the high window size with long texts
Suppress OK and Cancel buttons

Warning options

Set the dialog text
Set the icon name
Do not enable text wrapping
Do not enable Pango markup
Enable ellipsizing in the dialog text. This fixes the high window size with long texts

Scale options

Set the dialog text
Set initial value
Set minimum value
Set maximum value
Set step size
Print partial values
Hide value

Text information options

Open file
Allow changes to text
Set the text font
Enable an I read and agree checkbox
Auto scroll the text to the end. Only when text is captured from stdin

Color selection options

Set the color
Show the palette

Password dialog options

Display the username option

Forms dialog options

Add a new Entry in forms dialog
Add a new Password Entry in forms dialog
Add a new Calendar in forms dialog
Add a new List in forms dialog
List of values for List
List of values for columns
Add a new combo box in forms dialog
List of values for combo box
Show the columns header
Set the dialog text
Set output separator character
Set the format for the returned date

Miscellaneous options

About zenity
Print version

Application Options:

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

EXAMPLES

Display a file selector with the title Select a file to remove. The file selected is returned on standard output.

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.

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.

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

Zenity was originally written by Glynn Foster <glynn.foster@sun.com>. It has since been maintained by a number of contributors since then.

This manual page was originally written by Ross Burton <ross@burtonini.com>. It currently contains portions which are automatically generated, and other portions written by its original author.

SEE ALSO

dialog(1)

March 2024 zenity 4.0.1