User Commands zenity(1)
NAME
zenity, gdialog - display simple GNOME dialogs
SYNOPSIS
zenity --calendar [--title=title] [--window-icon=path] [--
width=width] [--height=height] [--timeout=seconds] [--
text=text] [--day=number] [--month=number] [--year=number]
[--date-format=format]
zenity --entry [--title=title] [--window-icon=path] [--
width=width] [--height=height] [--timeout=seconds] [--
text=text] [--entry-text=text] [--hide-text]
zenity --error | --info | --question | --warning [--
title=title] [--window-icon=path] [--width=width] [--
height=height] [--timeout=seconds] [--text=text] [--nowrap]
zenity --file-selection [--title=title] [--window-icon=path]
[--width=width] [--height=height] [--timeout=seconds] [--
filename=path] [--multiple] [--directory] [--save] [--
separator=character] [--confirm-overwrite]
zenity --list [--title=title] [--window-icon=path] [--
width=width] [--height=height] [--timeout=seconds] --
column=text [--checklist] [--radiolist] [--
separator=character] [--multiple] [--editable] [--print-
column=number] [--hide-column=number]
zenity --notification [--window-icon=path] [--
timeout=seconds] [--text=text] [--listen]
zenity --progress [--title=title] [--window-icon=path] [--
width=width] [--height=height] [--timeout=seconds] [--
text=text] [--percentage=number] [--pulsate] [--auto-close]
[--auto-kill]
zenity --scale [--title=title] [--window-icon=path] [--
width=width] [--height=height] [--timeout=seconds] [--
text=text] [--value=number] [--min-value=number] [--max-
value=number] [--step=number] [--print-partial] [--hide-
value]zenity --text-info [--title=title] [--window-icon=path] [--
width=width] [--height=height] [--timeout=seconds] [--
filename=path] [--editable]
zenity --about | - -help | --usage | --version | -
GTK+_options
DESCRIPTION
The zenity application displays simple GNOME dialogs. You can use Zenity to create scripts that interact graphicallySunOS 5.11 Last change: 15 Nov 2007 1
User Commands zenity(1)with the user. gdialog(1) has been deprecated and is now a
wrapper script around Zenity, and will preserve compatibil-
ity with older scripts. OPTIONS Zenity supports several different types of options. Zenity Miscellaneous Options The following miscellaneous options are supported:--about Display the About Zenity dialog,
which provides information about the Zenity application, including the version number and the author.--version Display the version number of Zen-
ity. Help Options The following help options are supported:-?, --help Display help text.
--help-* Display help text on specific dia-
logs. GTK+ OptionsZenity supports the standard GTK+ options. For more informa-
tion about the GTK+ options, execute the zenity --help-gtk-
command. Dialog Options The following dialog options are supported:--calendar Display a calendar dialog.
--entry Display a text entry dialog.
--error Display an error dialog.
SunOS 5.11 Last change: 15 Nov 2007 2
User Commands zenity(1)--file-selection Display a file-selection dialog.
--info Display an informational dialog.
--list Display a list dialog.
--notification Display a notification icon.
--progress Display a progress indication dia-
log.--question Display a question dialog.
--scale Display a scale dialog.
--text-info Display a text information dialog.
--warning Display a warning dialog.
General Dialog Options The following general dialog options are supported:--title=title Set the dialog title.
--window-icon=path Set the dialog window icon with a
full path to an image.--width=width Set the dialog width.
SunOS 5.11 Last change: 15 Nov 2007 3
User Commands zenity(1)--height=height Set the dialog height.
--timeout=seconds Set the dialog timeout in seconds.
Calendar Dialog Options The following calendar dialog options are supported:--text=text Set the dialog text.
--day=number Set the calendar day.
--month=number Set the calendar month.
--year=number Set the calendar year.
--date-format=format Set the date format to return at the
command line. The default format depends on your locale. The formatmust be of strftime style, for exam-
ple %A %d/%m/%y.
Text-Entry Dialog Options
The following text-entry dialog options are supported:
--text=text Set the dialog text.
--entry-text=text Set the dialog entry text.
--hide-text Use asterisks to hide the entry
text.SunOS 5.11 Last change: 15 Nov 2007 4
User Commands zenity(1) Error, Info, Question and Warning Dialog Options The following error, info, question and warning dialog options are supported:--text=text Set the dialog text.
--nowrap Do not enable text wrapping in the
dialog.File-Selection Dialog Options
The following file-selection dialog options are supported:
--filename=path Set the file or directory to select
by default.--multiple Allow multiple selections.
--directory Activate directory-only selection.
--save Activate save mode file selection.
--separator=character Set the separator character to
return at the command line. This option is used only when the dialog allows multiple selections.--confirm-overwrite Confirm overwrite of files.
List Dialog Options The following list dialog options are supported:--text=text Set the dialog text.
SunOS 5.11 Last change: 15 Nov 2007 5
User Commands zenity(1)--column=text Set the text of a column.
--checklist Specify that the first column con-
tains check boxes.--radiolist Specify that the first column con-
tains radio buttons.--separator=character Set the separator character to
return at the command line. This option is used only when the dialog allows multiple selections.--editable Specify that the dialog contents are
editable.--print-column=number Specify which column to print on
return.--hide-column=number Specify which columns should be hid-
den from view. Notification Options The following notification dialog options are supported:--text=text Set the dialog text.
--listen Listen for commands on standard
input. Commands include 'message', 'tooltip', 'icon', and 'visible' separated by a colon. For example, "message:Hello world", "icon:/path/to/icon", or "visible:false".SunOS 5.11 Last change: 15 Nov 2007 6
User Commands zenity(1)Progress-Indication Dialog Options
The following progress-indication dialog options are sup-
ported:--text=text Set the dialog text.
--percentage=number Set the initial percentage of the
progress bar.--pulsate Specify that the progress bar pul-
sates until an EOF character is read from the command line.--auto-close Close the dialog automatically when
100% has been reached.
--auto-kill Kill the parent process if cancel
button is pressed. Scale Dialog Options The following scale dialog options are supported:--text=text Set the dialog text.
--value=number Set the initial value.
--min-value=number Set the minimum value of the scale.
--max-value=number Set the maximum value of the scale.
--step=number Set the step size of the scale.
SunOS 5.11 Last change: 15 Nov 2007 7
User Commands zenity(1)--print-partial Set the values of the scale as they
are selected.--hide-value Set the value of the scale from
view.Text-Informational Dialog Options
The following text-informational dialog options are sup-
ported:--filename=path Set the file to display in the dia-
log.--editable Specify that the dialog contents are
editable.EXAMPLES
Example 1: Launching Zenity Using the List Dialogexample% zenity --list --title="Choose bugs you wish to view" \
--text="Select items from the list below." \
--column="Bug Number" --column="Severity" --column="Description" \
992383 Normal "GtkTreeView crashes on multiple selections" \ 293823 High "GNOME Dictionary does not handle proxy" \ 393823 Critical "Menu editing does not work in GNOME 2.0" Example 2: Launching Zenity Using the Progress Dialogexample% find . -name '*.bk' | zenity --progress \
--title="Finding backups" --pulsate
Example 3: Launching Zenity Using the Text Informational Dialogexample% zenity --text-info --title="OpenSolaris License" \
--filename="/usr/src/OPENSOLARIS.LICENSE"
ENVIRONMENT VARIABLES The following environment variables affect the execution of zenity:ZENITY_OK, DIALOG_OK Set the return value for OK.
SunOS 5.11 Last change: 15 Nov 2007 8
User Commands zenity(1)ZENITY_CANCEL, DIALOG_CANCEL Set the return value for
Cancel.ZENITY_ERROR, DIALOG_ERROR Set the return value for
Error.ZENITY_ESC, DIALOG_ESC Set the return value for
Escape. EXIT STATUS The following exit values are returned:-1 Error
0 OK 1 Cancel, Escape FILES The following files are used by this application: /usr/bin/zenity Executable for Zenity./usr/bin/gdialog Symbolic link to run zenity.
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:SunOS 5.11 Last change: 15 Nov 2007 9
User Commands zenity(1)____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | gnome/zenity ||_____________________________|_____________________________|
| Interface stability | Volitile ||_____________________________|_____________________________|
SEE ALSO
Zenity Manual Latest version of the GNOME Desktop User Guide for your platform.attributes(5), environ(5), gnome-std-options(5)
NOTES Written by Glynn Foster, Sun Microsystems Inc., 2003, 2004, 2006, 2007.SunOS 5.11 Last change: 15 Nov 2007 10