2011-12-27 15:48:15 +00:00
.TH ZENITY 1 "December 2011"
2003-02-05 10:31:02 +00:00
.SH NAME
zenity \- display GTK+ dialogs
.SH SYNOPSIS
.B zenity
.RI [ options ]
.SH DESCRIPTION
\fB zenity\fP 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.
.PP
2011-06-16 16:28:03 +00:00
For example, \fB zenity \- \- question\fP will return either 0, 1 or 5,
depending on whether the user pressed \fI OK\fP , \fI Cancel\fP or timeout
has been reached. \fB zenity --entry\fP will output on standard output
what the user typed into the text entry field.
2003-02-05 10:31:02 +00:00
.PP
2013-11-23 23:02:29 +00:00
Comprehensive documentation is available in the GNOME Help Browser.
2003-02-05 10:31:02 +00:00
.SH OPTIONS
This program follows the usual GNU command line syntax, with long
options starting with two dashes (`-').
.PP
Dialog options
.TP
.B \- \- calendar
Display calendar dialog
.TP
.B \- \- entry
Display text entry dialog
.TP
.B \- \- error
Display error dialog
.TP
2007-05-14 18:18:01 +00:00
.B \- \- file\-selection
2003-02-05 10:31:02 +00:00
Display file selection dialog
.TP
.B \- \- info
Display info dialog
.TP
.B \- \- list
Display list dialog
.TP
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com>
* data/Makefile.am, data/zenity-notification.png: Add new
notification icon.
* src/Makefile.am: Update for new files.
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
little bit for new utility functions for setting window icons.
* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
support.
* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
Add support for notification area.
* data/zenity.1, help/*: Update docs for notification and new file
selection changes.
2004-09-13 07:51:51 +00:00
.B \- \- notification
2010-10-20 23:03:27 +00:00
Display notification
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com>
* data/Makefile.am, data/zenity-notification.png: Add new
notification icon.
* src/Makefile.am: Update for new files.
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
little bit for new utility functions for setting window icons.
* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
support.
* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
Add support for notification area.
* data/zenity.1, help/*: Update docs for notification and new file
selection changes.
2004-09-13 07:51:51 +00:00
.TP
2003-02-05 10:31:02 +00:00
.B \- \- progress
Display progress indication dialog
.TP
.B \- \- question
Display question dialog
.TP
.B \- \- text-info
Display text information dialog
.TP
.B \- \- warning
Display warning dialog
2007-05-14 18:18:01 +00:00
.TP
.B \- \- scale
Display scale dialog
2010-06-28 15:44:29 +00:00
.TP
2010-02-23 18:24:20 +00:00
.B \- \- color-selection
Display color selection dialog
2011-12-27 15:48:15 +00:00
.TP
.B \- \- password
Display password dialog
.TP
.B \- \- forms
Display forms dialog
2003-02-05 10:31:02 +00:00
.PP
General options
.TP
.B \- \- title=TITLE
Set the dialog title
.TP
.B \- \- window-icon=ICONPATH
2010-06-28 15:44:29 +00:00
Set the window icon with the path to an image. Alternatively, one of the four stock icons can be used: 'error', 'info', 'question' or 'warning'
2003-05-28 23:19:16 +00:00
.TP
.B \- \- width=WIDTH
Set the dialog width
.TP
.B \- \- height=HEIGHT
Set the dialog height
2009-01-09 00:03:05 +00:00
.TP
.B \- \- timeout=TIMEOUT
2010-06-28 15:44:29 +00:00
Set the dialog timeout in seconds
2003-02-05 10:31:02 +00:00
.PP
Calendar options
.TP
.B \- \- text=STRING
Set the dialog text
.TP
.B \- \- day=INT
Set the calendar day
.TP
.B \- \- month=INT
Set the calendar month
.TP
.B \- \- year=INT
Set the calendar year
.TP
2007-05-14 18:18:01 +00:00
.B \- \- date-format=PATTERN
2010-06-28 15:44:29 +00:00
Set the format for the returned date. The default depends on the user locale or be set with the strftime style. For example %A %d/%m/%y
2003-02-05 10:31:02 +00:00
.PP
Text entry options
.TP
.B \- \- text=STRING
Set the dialog text
.TP
.B \- \- entry-text=STRING
Set the entry text
.TP
.B \- \- hide-text
Hide the entry text
.PP
Error options
.TP
.B \- \- text=STRING
Set the dialog text
2007-05-14 18:18:01 +00:00
.TP
.B \- \- no\-wrap
Do not enable text wrapping
2011-07-06 17:55:30 +00:00
.TP
.B \- \- no\-markup
Do not enable pango markup
2003-02-05 10:31:02 +00:00
.PP
File selection options
.TP
.B \- \- filename=FILENAME
2010-06-28 15:44:29 +00:00
Set the file or directory to be selected by default
2003-06-09 18:57:01 +00:00
.TP
.B \- \- multiple
Allow selection of multiple filenames in file selection dialog
.TP
2007-05-14 18:18:01 +00:00
.B \- \- directory
Activate directory-only selection
.TP
.B \- \- save
Activate save mode
.TP
2003-06-09 18:57:01 +00:00
.B \- \- separator=SEPARATOR
Specify separator character when returning multiple filenames
2007-05-14 18:18:01 +00:00
.TP
.B \- \- confirm\-overwrite
Confirm file selection if filename already exists
2010-06-28 15:44:29 +00:00
.TP
.B \- \- file\-filter=NAME | PATTERN1 PATTERN2
Sets a filename filter
2003-02-05 10:31:02 +00:00
.PP
Info options
.TP
.B \- \- text=STRING
Set the dialog text
2007-05-14 18:18:01 +00:00
.TP
.B \- \- no\-wrap
Do not enable text wrapping
2011-07-06 17:55:30 +00:00
.TP
.B \- \- no\-markup
Do not enable pango markup
2003-02-05 10:31:02 +00:00
.PP
List options
2004-04-28 12:06:02 +00:00
.TP
.B \- \- text=STRING
Set the dialog text
2003-02-05 10:31:02 +00:00
.TP
.B \- \- column=STRING
Set the column header
.TP
.B \- \- checklist
Use check boxes for first column
.TP
.B \- \- radiolist
Use radio buttons for first column
.TP
.B \- \- separator=STRING
Set output separator character
.TP
2007-05-14 18:18:01 +00:00
.B \- \- multiple
Allow multiple rows to be selected
.TP
2003-02-05 10:31:02 +00:00
.B \- \- editable
Allow changes to text
2004-08-03 09:14:27 +00:00
.TP
2009-12-13 18:23:14 +00:00
.B \- \- print-column=NUMBER
2004-08-03 09:14:27 +00:00
Specify what column to print to standard output. The default is to return
the first column. 'ALL' may be used to print all columns.
2007-05-14 18:18:01 +00:00
.TP
.B \- \- hide\-column=NUMBER
Hide a specific column
2010-06-28 15:44:29 +00:00
.TP
.B \- \- hide\-header
Hides the column headers
2003-02-05 10:31:02 +00:00
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com>
* data/Makefile.am, data/zenity-notification.png: Add new
notification icon.
* src/Makefile.am: Update for new files.
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
little bit for new utility functions for setting window icons.
* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
support.
* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
Add support for notification area.
* data/zenity.1, help/*: Update docs for notification and new file
selection changes.
2004-09-13 07:51:51 +00:00
.PP
Notification options
.TP
.B \- \- text=STRING
Set the notification text
2007-05-14 18:18:01 +00:00
.TP
.B \- \- listen
2010-06-28 15:44:29 +00:00
Listen for commands on stdin. Commands include 'message', 'tooltip', 'icon', and 'visible' separated by a colon. For example, 'message: Hello world', 'visible: false', or 'icon: /path/to/icon'. The icon command also accepts the four stock icon: 'error', 'info', 'question', and 'warning'
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com>
* data/Makefile.am, data/zenity-notification.png: Add new
notification icon.
* src/Makefile.am: Update for new files.
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
little bit for new utility functions for setting window icons.
* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
support.
* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
Add support for notification area.
* data/zenity.1, help/*: Update docs for notification and new file
selection changes.
2004-09-13 07:51:51 +00:00
2003-02-05 10:31:02 +00:00
.PP
Progress options
.TP
.B \- \- text=STRING
Set the dialog text
.TP
.B \- \- percentage=INT
Set initial percentage
.TP
2003-06-03 21:52:16 +00:00
.B \- \- auto\-close
Close dialog when 100% has been reached
.TP
2007-05-14 18:18:01 +00:00
.B \- \- auto\-kill
Kill parent process if cancel button is pressed
.TP
2003-02-05 10:31:02 +00:00
.B \- \- pulsate
Pulsate progress bar
2010-06-28 15:44:29 +00:00
.TP
.B \- \- no\-cancel
Hides the cancel button
2007-05-14 18:18:01 +00:00
.PP
2003-02-05 10:31:02 +00:00
Question options
2007-05-14 18:18:01 +00:00
2003-02-05 10:31:02 +00:00
.TP
.B \- \- text=STRING
Set the dialog text
2007-05-14 18:18:01 +00:00
.TP
.B \- \- no\-wrap
Do not enable text wrapping
2010-06-28 15:44:29 +00:00
.TP
2011-07-06 17:55:30 +00:00
.B \- \- no\-markup
Do not enable pango markup
.TP
2010-06-28 15:44:29 +00:00
.B \- \- ok\-label
Set the text of the OK button
.TP
.B \- \- cancel\-label
Set the text of the cancel button
2003-02-05 10:31:02 +00:00
.PP
Text options
.TP
.B \- \- filename=FILENAME
Open file
.TP
.B \- \- editable
Allow changes to text
2011-06-29 13:32:09 +00:00
.TP
.B \- \- checkbox=TEXT
Enable a checkbox for use like a 'I read and accept the terms.'
.TP
.B \- \- ok\-label
Set the text of the OK button
.TP
.B \- \- cancel\-label
Set the text of the cancel button
2003-02-05 10:31:02 +00:00
.PP
Warning options
.TP
.B \- \- text=STRING
Set the dialog text
2007-05-14 18:18:01 +00:00
.TP
.B \- \- no\-wrap
Do not enable text wrapping
2011-07-06 17:55:30 +00:00
.TP
.B \- \- no\-markup
Do not enable pango markup
2007-05-14 18:18:01 +00:00
.PP
Scale options
.TP
.B \- \- text=STRING
Set the dialog text
.TP
.B \- \- value=VALUE
Set initial value
.TP
.B \- \- min\-value=VALUE
Set minimum value
.TP
.B \- \- max\-value=VALUE
Set maximum value
.TP
.B \- \- step=VALUE
Set step size
.TP
.B \- \- print\-partial
Print partial values
.TP
.B \- \- hide\-value
Hide value
2003-02-05 10:31:02 +00:00
2010-02-23 18:24:20 +00:00
.PP
Color selection options
.TP
.B \- \- color=VALUE
Set the initial color
.TP
.B \- \- show\-palette
Show the palette
2011-12-27 15:48:15 +00:00
.PP
Password dialog options
.TP
.B \- \- username
Display the username field
.PP
Forms dialog options
.TP
.B \- \- add\-entry=FIELDNAME
Add a new Entry in forms dialog
.TP
.B \- \- add\-password=FIELDNAME
Add a new Password Entry in forms dialog
.TP
.B \- \- add\-calendar=FIELDNAME
Add a new Calendar in forms dialog
.TP
.B \- \- text=STRING
Set the dialog text
.TP
.B \- \- separator=STRING
Set output separator character
.TP
.B \- \- forms\-date-format=PATTERN
Set the format for the returned date. The default depends on the user locale or be set with the strftime style. For example %A %d/%m/%y
2003-02-05 10:31:02 +00:00
.PP
Miscellaneous options
.TP
.B \- ?, \- \- help
Show summary of options.
.TP
.B \- \- about
Display an about dialog.
.TP
.B \- \- version
Show version of program.
.PP
2011-12-27 15:48:15 +00:00
Also the standard GTK+ options are accepted. For more information about the GTK+ options, execute following command.
.IP
zenity \- \- help\- gtk
2003-02-05 10:31:02 +00:00
2009-08-10 02:29:53 +00:00
.SH ENVIRONMENT
Normally, zenity detects the terminal window from which it was launched and
keeps itself above that window. This behavior can be disabled by unsetting the
WINDOWID environment variable.
2003-02-05 10:31:02 +00:00
.SH EXAMPLES
Display a file selector with the title \fI Select a file to
remove\fP . The file selected is returned on standard output.
.IP
2005-09-21 14:38:02 +00:00
zenity \- \- title="Select a file to remove" \- \- file-selection
2003-02-05 10:31:02 +00:00
.PP
Display a text entry dialog with the title \fI Select Host\fP and the
text \fI Select the host you would like to flood-ping\fP . The entered
text is returned on standard output.
.IP
2005-09-21 14:38:02 +00:00
zenity \- \- title "Select Host" \- \- entry \- \- text "Select the host you would like to flood-ping"
2003-02-05 10:31:02 +00:00
.PP
Display a dialog, asking \fI Microsoft Windows has been found! Would
you like to remove it?\fP . The return code will be 0 (true in shell)
if \fI OK\fP is selected, and 1 (false) if \fI Cancel\fP is selected.
.IP
2005-09-21 14:38:02 +00:00
zenity \- \- question \- \- title "Alert" \- \- text "Microsoft Windows has been found! Would you like to remove it?"
2003-05-28 23:19:16 +00:00
.PP
Show the search results in a list dialog with the title \fI Search Results\fP
and the text \fI Finding all header files...\fP .
.IP
2005-09-24 15:15:04 +00:00
find . \- name '*.h' | zenity \- \- list \- \- title "Search Results" \- \- text "Finding all header files.." \- \- column "Files"
2003-05-28 23:19:16 +00:00
.PP
2010-10-20 23:03:27 +00:00
Show a notification in the message tray
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com>
* data/Makefile.am, data/zenity-notification.png: Add new
notification icon.
* src/Makefile.am: Update for new files.
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
little bit for new utility functions for setting window icons.
* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
support.
* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
Add support for notification area.
* data/zenity.1, help/*: Update docs for notification and new file
selection changes.
2004-09-13 07:51:51 +00:00
.IP
2005-09-21 14:38:02 +00:00
zenity \- \- notification \- \- window-icon=update.png \- \- text "System update necessary!"
Add new notification icon. Update for new files. Restructure code a little
2004-09-13 Glynn Foster <glynn.foster@sun.com>
* data/Makefile.am, data/zenity-notification.png: Add new
notification icon.
* src/Makefile.am: Update for new files.
* src/about.c, src/calendar.c, src/entry.c, src/fileselection.c,
src/progress.c, src/text.c, src/tree.c, src/msg.c: Restructure code a
little bit for new utility functions for setting window icons.
* src/eggtrayicon.c, src/eggtrayicon.h: New files for notification area
support.
* src/main.c, src/notification.c, src/util.c, src/util.h, src/zenity.h:
Add support for notification area.
* data/zenity.1, help/*: Update docs for notification and new file
selection changes.
2004-09-13 07:51:51 +00:00
.PP
2003-05-28 23:19:16 +00:00
Display a weekly shopping list in a check list dialog with \fI Apples\fP and \fI Oranges\fP pre selected
.IP
2005-09-21 14:38:02 +00:00
zenity \- \- list \- \- checklist \- \- column "Buy" \- \- column "Item" TRUE Apples TRUE Oranges FALSE Pears FALSE Toothpaste
2003-05-28 23:19:16 +00:00
.PP
Display a progress dialog while searching for all the postscript files in your home directory
.P
2006-03-31 22:49:57 +00:00
find $HOME \- name '*.ps' | zenity \- \- progress \- \- pulsate
2003-02-05 10:31:02 +00:00
.SH AUTHOR
2003-05-28 23:19:16 +00:00
\fB Zenity\fP was written by Glynn Foster <glynn.foster@sun.com>.
.P
This manual page was written by Ross Burton <ross@burtonini.com>.
2003-02-05 10:31:02 +00:00
.SH SEE ALSO
2017-09-20 02:39:38 +00:00
\fB dialog\fP (1)