635 lines
12 KiB
HTML
635 lines
12 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of ZENITY</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>ZENITY</H1>
|
|
Section: User Commands (1)<BR>Updated: December 2011<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
zenity - display GTK+ dialogs
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>zenity</B>
|
|
|
|
[<I>options</I>]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>zenity</B> 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.
|
|
<P>
|
|
|
|
For example, <B>zenity --question</B> will return either 0, 1 or 5,
|
|
depending on whether the user pressed <I>OK</I>, <I>Cancel</I> or timeout
|
|
has been reached. <B>zenity --entry</B> will output on standard output
|
|
what the user typed into the text entry field.
|
|
<P>
|
|
|
|
Comprehensive documentation is available in the GNOME Help Browser.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
This program follows the usual GNU command line syntax, with long
|
|
options starting with two dashes (`-').
|
|
<P>
|
|
<P>
|
|
|
|
Dialog options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="1"><B>--calendar</B>
|
|
|
|
<DD>
|
|
Display calendar dialog
|
|
<DT id="2"><B>--entry</B>
|
|
|
|
<DD>
|
|
Display text entry dialog
|
|
<DT id="3"><B>--error</B>
|
|
|
|
<DD>
|
|
Display error dialog
|
|
<DT id="4"><B>--file-selection</B>
|
|
|
|
<DD>
|
|
Display file selection dialog
|
|
<DT id="5"><B>--info</B>
|
|
|
|
<DD>
|
|
Display info dialog
|
|
<DT id="6"><B>--list</B>
|
|
|
|
<DD>
|
|
Display list dialog
|
|
<DT id="7"><B>--notification</B>
|
|
|
|
<DD>
|
|
Display notification
|
|
<DT id="8"><B>--progress</B>
|
|
|
|
<DD>
|
|
Display progress indication dialog
|
|
<DT id="9"><B>--question</B>
|
|
|
|
<DD>
|
|
Display question dialog
|
|
<DT id="10"><B>--text-info</B>
|
|
|
|
<DD>
|
|
Display text information dialog
|
|
<DT id="11"><B>--warning</B>
|
|
|
|
<DD>
|
|
Display warning dialog
|
|
<DT id="12"><B>--scale</B>
|
|
|
|
<DD>
|
|
Display scale dialog
|
|
<DT id="13"><B>--color-selection</B>
|
|
|
|
<DD>
|
|
Display color selection dialog
|
|
<DT id="14"><B>--password</B>
|
|
|
|
<DD>
|
|
Display password dialog
|
|
<DT id="15"><B>--forms</B>
|
|
|
|
<DD>
|
|
Display forms dialog
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
General options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="16"><B>--title=TITLE</B>
|
|
|
|
<DD>
|
|
Set the dialog title
|
|
<DT id="17"><B>--window-icon=ICONPATH</B>
|
|
|
|
<DD>
|
|
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'
|
|
<DT id="18"><B>--width=WIDTH</B>
|
|
|
|
<DD>
|
|
Set the dialog width
|
|
<DT id="19"><B>--height=HEIGHT</B>
|
|
|
|
<DD>
|
|
Set the dialog height
|
|
<DT id="20"><B>--timeout=TIMEOUT</B>
|
|
|
|
<DD>
|
|
Set the dialog timeout in seconds
|
|
</DL>
|
|
<P>
|
|
|
|
Calendar options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="21"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="22"><B>--day=INT</B>
|
|
|
|
<DD>
|
|
Set the calendar day
|
|
<DT id="23"><B>--month=INT</B>
|
|
|
|
<DD>
|
|
Set the calendar month
|
|
<DT id="24"><B>--year=INT</B>
|
|
|
|
<DD>
|
|
Set the calendar year
|
|
<DT id="25"><B>--date-format=PATTERN</B>
|
|
|
|
<DD>
|
|
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
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Text entry options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="26"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="27"><B>--entry-text=STRING</B>
|
|
|
|
<DD>
|
|
Set the entry text
|
|
<DT id="28"><B>--hide-text</B>
|
|
|
|
<DD>
|
|
Hide the entry text
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Error options
|
|
<DL COMPACT>
|
|
<DT id="29"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="30"><B>--no-wrap</B>
|
|
|
|
<DD>
|
|
Do not enable text wrapping
|
|
<DT id="31"><B>--no-markup</B>
|
|
|
|
<DD>
|
|
Do not enable pango markup
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
File selection options
|
|
<DL COMPACT>
|
|
<DT id="32"><B>--filename=FILENAME</B>
|
|
|
|
<DD>
|
|
Set the file or directory to be selected by default
|
|
<DT id="33"><B>--multiple</B>
|
|
|
|
<DD>
|
|
Allow selection of multiple filenames in file selection dialog
|
|
<DT id="34"><B>--directory</B>
|
|
|
|
<DD>
|
|
Activate directory-only selection
|
|
<DT id="35"><B>--save</B>
|
|
|
|
<DD>
|
|
Activate save mode
|
|
<DT id="36"><B>--separator=SEPARATOR</B>
|
|
|
|
<DD>
|
|
Specify separator character when returning multiple filenames
|
|
<DT id="37"><B>--confirm-overwrite</B>
|
|
|
|
<DD>
|
|
Confirm file selection if filename already exists
|
|
<DT id="38"><B>--file-filter=NAME | PATTERN1 PATTERN2</B>
|
|
|
|
<DD>
|
|
Sets a filename filter
|
|
<P>
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Info options
|
|
<DL COMPACT>
|
|
<DT id="39"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="40"><B>--no-wrap</B>
|
|
|
|
<DD>
|
|
Do not enable text wrapping
|
|
<DT id="41"><B>--no-markup</B>
|
|
|
|
<DD>
|
|
Do not enable pango markup
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
List options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="42"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="43"><B>--column=STRING</B>
|
|
|
|
<DD>
|
|
Set the column header
|
|
<DT id="44"><B>--checklist</B>
|
|
|
|
<DD>
|
|
Use check boxes for first column
|
|
<DT id="45"><B>--radiolist</B>
|
|
|
|
<DD>
|
|
Use radio buttons for first column
|
|
<DT id="46"><B>--separator=STRING</B>
|
|
|
|
<DD>
|
|
Set output separator character
|
|
<DT id="47"><B>--multiple</B>
|
|
|
|
<DD>
|
|
Allow multiple rows to be selected
|
|
<DT id="48"><B>--editable</B>
|
|
|
|
<DD>
|
|
Allow changes to text
|
|
<DT id="49"><B>--print-column=NUMBER</B>
|
|
|
|
<DD>
|
|
Specify what column to print to standard output. The default is to return
|
|
the first column. 'ALL' may be used to print all columns.
|
|
<DT id="50"><B>--hide-column=NUMBER</B>
|
|
|
|
<DD>
|
|
Hide a specific column
|
|
<DT id="51"><B>--hide-header</B>
|
|
|
|
<DD>
|
|
Hides the column headers
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Notification options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="52"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the notification text
|
|
<DT id="53"><B>--listen</B>
|
|
|
|
<DD>
|
|
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'
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Progress options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="54"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="55"><B>--percentage=INT</B>
|
|
|
|
<DD>
|
|
Set initial percentage
|
|
<DT id="56"><B>--auto-close</B>
|
|
|
|
<DD>
|
|
Close dialog when 100% has been reached
|
|
<DT id="57"><B>--auto-kill</B>
|
|
|
|
<DD>
|
|
Kill parent process if cancel button is pressed
|
|
<DT id="58"><B>--pulsate</B>
|
|
|
|
<DD>
|
|
Pulsate progress bar
|
|
<DT id="59"><B>--no-cancel</B>
|
|
|
|
<DD>
|
|
Hides the cancel button
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Question options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="60"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="61"><B>--no-wrap</B>
|
|
|
|
<DD>
|
|
Do not enable text wrapping
|
|
<DT id="62"><B>--no-markup</B>
|
|
|
|
<DD>
|
|
Do not enable pango markup
|
|
<DT id="63"><B>--ok-label</B>
|
|
|
|
<DD>
|
|
Set the text of the OK button
|
|
<DT id="64"><B>--cancel-label</B>
|
|
|
|
<DD>
|
|
Set the text of the cancel button
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Text options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="65"><B>--filename=FILENAME</B>
|
|
|
|
<DD>
|
|
Open file
|
|
<DT id="66"><B>--editable</B>
|
|
|
|
<DD>
|
|
Allow changes to text
|
|
<DT id="67"><B>--checkbox=TEXT</B>
|
|
|
|
<DD>
|
|
Enable a checkbox for use like a 'I read and accept the terms.'
|
|
<DT id="68"><B>--ok-label</B>
|
|
|
|
<DD>
|
|
Set the text of the OK button
|
|
<DT id="69"><B>--cancel-label</B>
|
|
|
|
<DD>
|
|
Set the text of the cancel button
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Warning options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="70"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="71"><B>--no-wrap</B>
|
|
|
|
<DD>
|
|
Do not enable text wrapping
|
|
<DT id="72"><B>--no-markup</B>
|
|
|
|
<DD>
|
|
Do not enable pango markup
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Scale options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="73"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="74"><B>--value=VALUE</B>
|
|
|
|
<DD>
|
|
Set initial value
|
|
<DT id="75"><B>--min-value=VALUE</B>
|
|
|
|
<DD>
|
|
Set minimum value
|
|
<DT id="76"><B>--max-value=VALUE</B>
|
|
|
|
<DD>
|
|
Set maximum value
|
|
<DT id="77"><B>--step=VALUE</B>
|
|
|
|
<DD>
|
|
Set step size
|
|
<DT id="78"><B>--print-partial</B>
|
|
|
|
<DD>
|
|
Print partial values
|
|
<DT id="79"><B>--hide-value</B>
|
|
|
|
<DD>
|
|
Hide value
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Color selection options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="80"><B>--color=VALUE</B>
|
|
|
|
<DD>
|
|
Set the initial color
|
|
<DT id="81"><B>--show-palette</B>
|
|
|
|
<DD>
|
|
Show the palette
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Password dialog options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="82"><B>--username</B>
|
|
|
|
<DD>
|
|
Display the username field
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Forms dialog options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="83"><B>--add-entry=FIELDNAME</B>
|
|
|
|
<DD>
|
|
Add a new Entry in forms dialog
|
|
<DT id="84"><B>--add-password=FIELDNAME</B>
|
|
|
|
<DD>
|
|
Add a new Password Entry in forms dialog
|
|
<DT id="85"><B>--add-calendar=FIELDNAME</B>
|
|
|
|
<DD>
|
|
Add a new Calendar in forms dialog
|
|
<DT id="86"><B>--text=STRING</B>
|
|
|
|
<DD>
|
|
Set the dialog text
|
|
<DT id="87"><B>--separator=STRING</B>
|
|
|
|
<DD>
|
|
Set output separator character
|
|
<DT id="88"><B>--forms-date-format=PATTERN</B>
|
|
|
|
<DD>
|
|
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
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Miscellaneous options
|
|
<P>
|
|
<DL COMPACT>
|
|
<DT id="89"><B>-?, --help</B>
|
|
|
|
<DD>
|
|
Show summary of options.
|
|
<DT id="90"><B>--about</B>
|
|
|
|
<DD>
|
|
Display an about dialog.
|
|
<DT id="91"><B>--version</B>
|
|
|
|
<DD>
|
|
Show version of program.
|
|
<P>
|
|
</DL>
|
|
<P>
|
|
|
|
Also the standard GTK+ options are accepted. For more information about the GTK+ options, execute following command.
|
|
<DL COMPACT>
|
|
<DT id="92"><DD>
|
|
zenity --help-gtk
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<P>
|
|
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.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
Display a file selector with the title <I>Select a file to
|
|
remove</I>. The file selected is returned on standard output.
|
|
<DL COMPACT>
|
|
<DT id="93"><DD>
|
|
zenity --title="Select a file to remove" --file-selection
|
|
</DL>
|
|
<P>
|
|
|
|
Display a text entry dialog with the title <I>Select Host</I> and the
|
|
text <I>Select the host you would like to flood-ping</I>. The entered
|
|
text is returned on standard output.
|
|
<DL COMPACT>
|
|
<DT id="94"><DD>
|
|
zenity --title "Select Host" --entry --text "Select the host you would like to flood-ping"
|
|
</DL>
|
|
<P>
|
|
|
|
Display a dialog, asking <I>Microsoft Windows has been found! Would
|
|
you like to remove it?</I>. The return code will be 0 (true in shell)
|
|
if <I>OK</I> is selected, and 1 (false) if <I>Cancel</I> is selected.
|
|
<DL COMPACT>
|
|
<DT id="95"><DD>
|
|
zenity --question --title "Alert" --text "Microsoft Windows has been found! Would you like to remove it?"
|
|
</DL>
|
|
<P>
|
|
|
|
Show the search results in a list dialog with the title <I>Search Results</I>
|
|
and the text <I>Finding all header files...</I>.
|
|
<DL COMPACT>
|
|
<DT id="96"><DD>
|
|
find . -name '*.h' | zenity --list --title "Search Results" --text "Finding all header files.." --column "Files"
|
|
</DL>
|
|
<P>
|
|
|
|
Show a notification in the message tray
|
|
<DL COMPACT>
|
|
<DT id="97"><DD>
|
|
zenity --notification --window-icon=update.png --text "System update necessary!"
|
|
</DL>
|
|
<P>
|
|
|
|
Display a weekly shopping list in a check list dialog with <I>Apples</I> and <I>Oranges</I> pre selected
|
|
<DL COMPACT>
|
|
<DT id="98"><DD>
|
|
zenity --list --checklist --column "Buy" --column "Item" TRUE Apples TRUE Oranges FALSE Pears FALSE Toothpaste
|
|
</DL>
|
|
<P>
|
|
|
|
Display a progress dialog while searching for all the postscript files in your home directory
|
|
<P>
|
|
|
|
find $HOME -name '*.ps' | zenity --progress --pulsate
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<B>Zenity</B> was written by Glynn Foster <<A HREF="mailto:glynn.foster@sun.com">glynn.foster@sun.com</A>>.
|
|
<P>
|
|
|
|
This manual page was written by Ross Burton <<A HREF="mailto:ross@burtonini.com">ross@burtonini.com</A>>.
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+dialog">dialog</A></B>(1)
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="99"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="100"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="101"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="102"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="103"><A HREF="#lbAF">ENVIRONMENT</A><DD>
|
|
<DT id="104"><A HREF="#lbAG">EXAMPLES</A><DD>
|
|
<DT id="105"><A HREF="#lbAH">AUTHOR</A><DD>
|
|
<DT id="106"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:31 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|