1ZENITY(1)                   General Commands Manual                  ZENITY(1)
2
3
4

NAME

6       zenity - display GTK+ dialogs
7

SYNOPSIS

9       zenity [options]
10

DESCRIPTION

12       zenity  is a program that will display GTK+ dialogs, and return (either
13       in the return code, or on standard output) the users input. This allows
14       you to present information, and ask for information from the user, from
15       all manner of shell scripts.
16
17       For example, zenity --question will return either 0, 1 or 5,  depending
18       on  whether  the  user  pressed OK, Cancel or timeout has been reached.
19       zenity --entry will output on standard output what the user typed  into
20       the text entry field.
21
22       Comprehensive documentation is available in the GNOME Help Browser.
23

OPTIONS

25       This  program  follows the usual GNU command line syntax, with long op‐
26       tions starting with two dashes (`-').
27
28
29       Dialog options
30
31
32       --calendar
33              Display calendar dialog
34
35       --entry
36              Display text entry dialog
37
38       --error
39              Display error dialog
40
41       --file-selection
42              Display file selection dialog
43
44       --info Display info dialog
45
46       --list Display list dialog
47
48       --notification
49              Display notification
50
51       --progress
52              Display progress indication dialog
53
54       --question
55              Display question dialog
56
57       --text-info
58              Display text information dialog
59
60       --warning
61              Display warning dialog
62
63       --scale
64              Display scale dialog
65
66       --color-selection
67              Display color selection dialog
68
69       --password
70              Display password dialog
71
72       --forms
73              Display forms dialog
74
75
76       General options
77
78
79       --title=TITLE
80              Set the dialog title
81
82       --window-icon=ICONPATH
83              Set the window icon with the path to  an  image.  Alternatively,
84              one of the four stock icons can be used: 'error', 'info', 'ques‐
85              tion' or 'warning'
86
87       --icon-name=ICONNAME
88              The name of the icon to display on the dialog  to  override  the
89              default stock icons
90
91       --width=WIDTH
92              Set the dialog width
93
94       --height=HEIGHT
95              Set the dialog height
96
97       --timeout=TIMEOUT
98              Set the dialog timeout in seconds
99
100       Calendar options
101
102
103       --text=STRING
104              Set the dialog text
105
106       --day=INT
107              Set the calendar day
108
109       --month=INT
110              Set the calendar month
111
112       --year=INT
113              Set the calendar year
114
115       --date-format=PATTERN
116              Set the format for the returned date. The default depends on the
117              user locale or be set with the strftime style.  For  example  %A
118              %d/%m/%y
119
120
121       Text entry options
122
123
124       --text=STRING
125              Set the dialog text
126
127       --entry-text=STRING
128              Set the entry text
129
130       --hide-text
131              Hide the entry text
132
133
134       Error options
135
136       --text=STRING
137              Set the dialog text
138
139       --no-wrap
140              Do not enable text wrapping
141
142       --no-markup
143              Do not enable pango markup
144
145
146       File selection options
147
148       --filename=FILENAME
149              Set the file or directory to be selected by default
150
151       --multiple
152              Allow selection of multiple filenames in file selection dialog
153
154       --directory
155              Activate directory-only selection
156
157       --save Activate save mode
158
159       --separator=SEPARATOR
160              Specify separator character when returning multiple filenames
161
162       --confirm-overwrite
163              Confirm file selection if filename already exists
164
165       --file-filter=NAME | PATTERN1 PATTERN2
166              Sets a filename filter
167
168
169
170       Info options
171
172       --text=STRING
173              Set the dialog text
174
175       --no-wrap
176              Do not enable text wrapping
177
178       --no-markup
179              Do not enable pango markup
180
181
182       List options
183
184
185       --text=STRING
186              Set the dialog text
187
188       --column=STRING
189              Set the column header
190
191       --checklist
192              Use check boxes for first column
193
194       --radiolist
195              Use radio buttons for first column
196
197       --separator=STRING
198              Set output separator character
199
200       --multiple
201              Allow multiple rows to be selected
202
203       --editable
204              Allow changes to text
205
206       --print-column=NUMBER
207              Specify  what column to print to standard output. The default is
208              to return the first column. 'ALL' may be used to print all  col‐
209              umns.
210
211       --hide-column=NUMBER
212              Hide a specific column
213
214       --hide-header
215              Hides the column headers
216
217
218       Notification options
219
220
221       --text=STRING
222              Set the notification text
223
224       --listen
225              Listen  for  commands  on  stdin.  Commands  include  'message',
226              'tooltip', 'icon', and 'visible' separated by a colon. For exam‐
227              ple,   'message:  Hello  world',  'visible:  false',  or  'icon:
228              /path/to/icon'. The icon command also  accepts  the  four  stock
229              icon: 'error', 'info', 'question', and 'warning'
230
231
232       Progress options
233
234
235       --text=STRING
236              Set the dialog text
237
238       --percentage=INT
239              Set initial percentage
240
241       --auto-close
242              Close dialog when 100% has been reached
243
244       --auto-kill
245              Kill parent process if cancel button is pressed
246
247       --pulsate
248              Pulsate progress bar
249
250       --no-cancel
251              Hides the cancel button
252
253
254       Question options
255
256
257       --text=STRING
258              Set the dialog text
259
260       --no-wrap
261              Do not enable text wrapping
262
263       --no-markup
264              Do not enable pango markup
265
266       --ok-label
267              Set the text of the OK button
268
269       --cancel-label
270              Set the text of the cancel button
271
272
273       Text options
274
275
276       --filename=FILENAME
277              Open file
278
279       --editable
280              Allow changes to text
281
282       --checkbox=TEXT
283              Enable a checkbox for use like a 'I read and accept the terms.'
284
285       --ok-label
286              Set the text of the OK button
287
288       --cancel-label
289              Set the text of the cancel button
290
291
292       Warning options
293
294
295       --text=STRING
296              Set the dialog text
297
298       --no-wrap
299              Do not enable text wrapping
300
301       --no-markup
302              Do not enable pango markup
303
304
305       Scale options
306
307
308       --text=STRING
309              Set the dialog text
310
311       --value=VALUE
312              Set initial value
313
314       --min-value=VALUE
315              Set minimum value
316
317       --max-value=VALUE
318              Set maximum value
319
320       --step=VALUE
321              Set step size
322
323       --print-partial
324              Print partial values
325
326       --hide-value
327              Hide value
328
329
330       Color selection options
331
332
333       --color=VALUE
334              Set the initial color
335
336       --show-palette
337              Show the palette
338
339
340       Password dialog options
341
342
343       --username
344              Display the username field
345
346
347       Forms dialog options
348
349
350       --add-entry=FIELDNAME
351              Add a new Entry in forms dialog
352
353       --add-password=FIELDNAME
354              Add a new Password Entry in forms dialog
355
356       --add-calendar=FIELDNAME
357              Add a new Calendar in forms dialog
358
359       --text=STRING
360              Set the dialog text
361
362       --separator=STRING
363              Set output separator character
364
365       --forms-date-format=PATTERN
366              Set the format for the returned date. The default depends on the
367              user locale or be set with the strftime style.  For  example  %A
368              %d/%m/%y
369
370
371       Miscellaneous options
372
373
374       -?, --help
375              Show summary of options.
376
377       --about
378              Display an about dialog.
379
380       --version
381              Show version of program.
382
383
384       Also the standard GTK+ options are accepted. For more information about
385       the GTK+ options, execute following command.
386
387              zenity --help-gtk
388
389

ENVIRONMENT

391       Normally, zenity detects the terminal window from which it was launched
392       and  keeps  itself above that window.  This behavior can be disabled by
393       unsetting the WINDOWID environment variable.
394
395

EXAMPLES

397       Display a file selector with the title Select a  file  to  remove.  The
398       file selected is returned on standard output.
399
400              zenity  --title="Select a file to remove" --file-selection
401
402       Display a text entry dialog with the title Select Host and the text Se‐
403       lect the host you would like to flood-ping. The  entered  text  is  re‐
404       turned on standard output.
405
406              zenity   --title  "Select  Host" --entry --text "Select the host
407              you would like to flood-ping"
408
409       Display a dialog, asking Microsoft Windows has been  found!  Would  you
410       like  to remove it?. The return code will be 0 (true in shell) if OK is
411       selected, and 1 (false) if Cancel is selected.
412
413              zenity  --question --title "Alert"   --text  "Microsoft  Windows
414              has been found! Would you like to remove it?"
415
416       Show  the search results in a list dialog with the title Search Results
417       and the text Finding all header files....
418
419              find . -name '*.h' |  zenity  --list  --title  "Search  Results"
420              --text "Finding all header files.." --column "Files"
421
422       Show a notification in the message tray
423
424              zenity  --notification  --window-icon=update.png  --text "System
425              update necessary!"
426
427       Display a weekly shopping list in a check list dialog with  Apples  and
428       Oranges pre selected
429
430              zenity  --list  --checklist  --column "Buy" --column "Item" TRUE
431              Apples TRUE Oranges FALSE Pears FALSE Toothpaste
432
433       Display a progress dialog while searching for all the postscript  files
434       in your home directory
435
436       find $HOME -name '*.ps' | zenity --progress --pulsate
437

AUTHOR

439       Zenity was written by Glynn Foster <glynn.foster@sun.com>.
440
441       This manual page was written by Ross Burton <ross@burtonini.com>.
442
443

SEE ALSO

445       dialog(1)
446
447
448
449                                 December 2011                       ZENITY(1)
Impressum