1ZENITY(1) User Commands ZENITY(1)
2
3
4
6 zenity - display GTK dialogs
7
9 zenity is a program that will display GTK+ dialogs, and return (either
10 in the return code, or on standard output) the users input. This allows
11 you to present information, and ask for information from the user, from
12 all manner of shell scripts.
13
14 For example, zenity --question will return either 0, 1 or 5, depending
15 on whether the user pressed OK, Cancel or timeout has been reached.
16 zenity --entry will output on standard output what the user typed into
17 the text entry field.
18
19 Comprehensive documentation is also available in the GNOME Help
20 Browser.
21
22 Usage:
23 zenity [OPTION?]
24
25 Help Options:
26 -h, --help
27 Show help options
28
29 --help-all
30 Show all help options
31
32 --help-general
33 Show general options
34
35 --help-calendar
36 Show calendar options
37
38 --help-entry
39 Show text entry options
40
41 --help-error
42 Show error options
43
44 --help-info
45 Show info options
46
47 --help-file-selection
48 Show file selection options
49
50 --help-list
51 Show list options
52
53 --help-notification
54 Show notification options
55
56 --help-progress
57 Show progress options
58
59 --help-question
60 Show question options
61
62 --help-warning
63 Show warning options
64
65 --help-scale
66 Show scale options
67
68 --help-text-info
69 Show text information options
70
71 --help-color-selection
72 Show color selection options
73
74 --help-password
75 Show password dialog options
76
77 --help-forms
78 Show forms dialog options
79
80 --help-misc
81 Show miscellaneous options
82
83 General options
84
85 --title=TITLE
86 Set the dialog title
87
88 --width=WIDTH
89 Set the width
90
91 --height=HEIGHT
92 Set the height
93
94 --timeout=TIMEOUT
95 Set dialog timeout in seconds
96
97 --ok-label=TEXT
98 Set the label of the OK button
99
100 --cancel-label=TEXT
101 Set the label of the Cancel button
102
103 --extra-button=TEXT
104 Add an extra button
105
106 --modal
107 Set the modal hint
108
109 --attach=WINDOW
110 DEPRECATED; does nothing
111
112 Calendar options
113
114 --text=TEXT
115 Set the dialog text
116
117 --day=DAY
118 Set the calendar day
119
120 --month=MONTH
121 Set the calendar month
122
123 --year=YEAR
124 Set the calendar year
125
126 --date-format=PATTERN
127 Set the format for the returned date
128
129 Text entry options
130
131 --text=TEXT
132 Set the dialog text
133
134 --entry-text=TEXT
135 Set the entry text
136
137 --hide-text
138 Hide the entry text
139
140 Error options
141
142 --text=TEXT
143 Set the dialog text
144
145 --icon=ICON-NAME
146 Set the icon name
147
148 --no-wrap
149 Do not enable text wrapping
150
151 --no-markup
152 Do not enable Pango markup
153
154 --ellipsize
155 Enable ellipsizing in the dialog text. This fixes the high win‐
156 dow size with long texts
157
158 Info options
159
160 --text=TEXT
161 Set the dialog text
162
163 --icon=ICON-NAME
164 Set the icon name
165
166 --no-wrap
167 Do not enable text wrapping
168
169 --no-markup
170 Do not enable Pango markup
171
172 --ellipsize
173 Enable ellipsizing in the dialog text. This fixes the high win‐
174 dow size with long texts
175
176 File selection options
177
178 --filename=FILENAME
179 Set the filename
180
181 --multiple
182 Allow multiple files to be selected
183
184 --directory
185 Activate directory-only selection
186
187 --save Activate save mode
188
189 --separator=SEPARATOR
190 Set output separator character
191
192 --file-filter=NAME | PATTERN1 PATTERN2 ...
193 Set a filename filter
194
195 --confirm-overwrite
196 DEPRECATED; does nothing
197
198 List options
199
200 --text=TEXT
201 Set the dialog text
202
203 --column=COLUMN
204 Set the column header
205
206 --checklist
207 Use check boxes for the first column
208
209 --radiolist
210 Use radio buttons for the first column
211
212 --imagelist
213 Use an image for the first column
214
215 --separator=SEPARATOR
216 Set output separator character
217
218 --multiple
219 Allow multiple rows to be selected
220
221 --editable
222 Allow changes to text
223
224 --print-column=NUMBER
225 Print a specific column (Default is 1. 'ALL' can be used to
226 print all columns)
227
228 --hide-column=NUMBER
229 Hide a specific column
230
231 --hide-header
232 Hide the column headers
233
234 --mid-search
235 DEPRECATED; does nothing
236
237 Notification options
238
239 --text=TEXT
240 Set the notification text
241
242 --icon=ICON-NAME
243 Set the icon name
244
245 --listen
246 Listen for commands on stdin
247
248 --hint=TEXT
249 DEPRECATED; does nothing
250
251 Progress options
252
253 --text=TEXT
254 Set the dialog text
255
256 --percentage=PERCENTAGE
257 Set initial percentage
258
259 --pulsate
260 Pulsate progress bar
261
262 --auto-close
263 Dismiss the dialog when 100% has been reached
264
265 --auto-kill
266 Kill parent process if Cancel button is pressed
267
268 --no-cancel
269 Hide Cancel button
270
271 --time-remaining
272 Estimate when progress will reach 100%
273
274 Question options
275
276 --text=TEXT
277 Set the dialog text
278
279 --icon=ICON-NAME
280 Set the icon name
281
282 --no-wrap
283 Do not enable text wrapping
284
285 --no-markup
286 Do not enable Pango markup
287
288 --default-cancel
289 Give Cancel button focus by default
290
291 --ellipsize
292 Enable ellipsizing in the dialog text. This fixes the high win‐
293 dow size with long texts
294
295 --switch
296 Suppress OK and Cancel buttons
297
298 Warning options
299
300 --text=TEXT
301 Set the dialog text
302
303 --icon=ICON-NAME
304 Set the icon name
305
306 --no-wrap
307 Do not enable text wrapping
308
309 --no-markup
310 Do not enable Pango markup
311
312 --ellipsize
313 Enable ellipsizing in the dialog text. This fixes the high win‐
314 dow size with long texts
315
316 Scale options
317
318 --text=TEXT
319 Set the dialog text
320
321 --value=VALUE
322 Set initial value
323
324 --min-value=VALUE
325 Set minimum value
326
327 --max-value=VALUE
328 Set maximum value
329
330 --step=VALUE
331 Set step size
332
333 --print-partial
334 Print partial values
335
336 --hide-value
337 Hide value
338
339 Text information options
340
341 --filename=FILENAME
342 Open file
343
344 --editable
345 Allow changes to text
346
347 --font=TEXT
348 Set the text font
349
350 --checkbox=TEXT
351 Enable an I read and agree checkbox
352
353 --auto-scroll
354 Auto scroll the text to the end. Only when text is captured from
355 stdin
356
357 Color selection options
358
359 --color=VALUE
360 Set the color
361
362 --show-palette
363 Show the palette
364
365 Password dialog options
366
367 --username
368 Display the username option
369
370 Forms dialog options
371
372 --add-entry=Field name
373 Add a new Entry in forms dialog
374
375 --add-password=Field name
376 Add a new Password Entry in forms dialog
377
378 --add-calendar=Calendar field name
379 Add a new Calendar in forms dialog
380
381 --add-list=List field and header name
382 Add a new List in forms dialog
383
384 --list-values=List of values separated by |
385 List of values for List
386
387 --column-values=List of values separated by |
388 List of values for columns
389
390 --add-combo=Combo box field name
391 Add a new combo box in forms dialog
392
393 --combo-values=List of values separated by |
394 List of values for combo box
395
396 --show-header
397 Show the columns header
398
399 --text=TEXT
400 Set the dialog text
401
402 --separator=SEPARATOR
403 Set output separator character
404
405 --forms-date-format=PATTERN
406 Set the format for the returned date
407
408 Miscellaneous options
409
410 --about
411 About zenity
412
413 --version
414 Print version
415
416 Application Options:
417 --calendar
418 Display calendar dialog
419
420 --entry
421 Display text entry dialog
422
423 --error
424 Display error dialog
425
426 --info Display info dialog
427
428 --file-selection
429 Display file selection dialog
430
431 --list Display list dialog
432
433 --notification
434 Display notification
435
436 --progress
437 Display progress indication dialog
438
439 --question
440 Display question dialog
441
442 --warning
443 Display warning dialog
444
445 --scale
446 Display scale dialog
447
448 --text-info
449 Display text information dialog
450
451 --color-selection
452 Display color selection dialog
453
454 --password
455 Display password dialog
456
457 --forms
458 Display forms dialog
459
461 Display a file selector with the title Select a file to remove. The
462 file selected is returned on standard output.
463
464 zenity --title="Select a file to remove" --file-selection
465
466 Display a text entry dialog with the title Select Host and the text Se‐
467 lect the host you would like to flood-ping. The entered text is re‐
468 turned on standard output.
469
470 zenity --title "Select Host" --entry --text "Select the host
471 you would like to flood-ping"
472
473 Display a dialog, asking Microsoft Windows has been found! Would you
474 like to remove it?. The return code will be 0 (true in shell) if OK is
475 selected, and 1 (false) if Cancel is selected.
476
477 zenity --question --title "Alert" --text "Microsoft Windows
478 has been found! Would you like to remove it?"
479
480 Show the search results in a list dialog with the title Search Results
481 and the text Finding all header files....
482
483 find . -name '*.h' | zenity --list --title "Search Results"
484 --text "Finding all header files.." --column "Files"
485
486 Show a passive notification
487
488 zenity --notification --icon=software-update-available --text
489 "System update necessary!"
490
491 Display a weekly shopping list in a check list dialog with Apples and
492 Oranges pre selected
493
494 zenity --list --checklist --column "Buy" --column "Item" TRUE
495 Apples TRUE Oranges FALSE Pears FALSE Toothpaste
496
497 Display a progress dialog while searching for all the postscript files
498 in your home directory
499
500 find $HOME -name '*.ps' | zenity --progress --pulsate
501
503 Zenity was originally written by Glynn Foster <glynn.foster@sun.com>.
504 It has since been maintained by a number of contributors since then.
505
506 This manual page was originally written by Ross Burton <ross@bur‐
507 tonini.com>. It currently contains portions which are automatically
508 generated, and other portions written by its original author.
509
511 dialog(1)
512
513
514
515zenity May 2023 ZENITY(1)