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

ENVIRONMENT

387       Normally, zenity detects the terminal window from which it was launched
388       and keeps itself above that window.  This behavior can be  disabled  by
389       unsetting the WINDOWID environment variable.
390
391

EXAMPLES

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

AUTHOR

435       Zenity was written by Glynn Foster <glynn.foster@sun.com>.
436
437       This manual page was written by Ross Burton <ross@burtonini.com>.
438
439

SEE ALSO

441       dialog(1)
442
443
444
445                                 December 2011                       ZENITY(1)
Impressum