1ZENITY(1) General Commands Manual ZENITY(1)
2
3
4
6 zenity - display GTK+ dialogs
7
9 zenity [options]
10
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 or 1, depending on
18 whether the user pressed OK or Cancel. zenity --entry will output on
19 standard output what the user typed into the text entry field.
20
21 Comprehensive documentation is available in the GNOME Help Browser,
22 under GNOME/Utilities.
23
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 icon
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
67 General options
68
69
70 --title=TITLE
71 Set the dialog title
72
73 --window-icon=ICONPATH
74 Set the window icon
75
76 --width=WIDTH
77 Set the dialog width
78
79 --height=HEIGHT
80 Set the dialog height
81
82 --timeout=TIMEOUT
83 Set the dialog timeout
84
85 Calendar options
86
87
88 --text=STRING
89 Set the dialog text
90
91 --day=INT
92 Set the calendar day
93
94 --month=INT
95 Set the calendar month
96
97 --year=INT
98 Set the calendar year
99
100 --date-format=PATTERN
101 Set the format for the returned date
102
103
104 Text entry options
105
106
107 --text=STRING
108 Set the dialog text
109
110 --entry-text=STRING
111 Set the entry text
112
113 --hide-text
114 Hide the entry text
115
116
117 Error options
118
119 --text=STRING
120 Set the dialog text
121
122 --no-wrap
123 Do not enable text wrapping
124
125
126 File selection options
127
128 --filename=FILENAME
129 Set the filename
130
131 --multiple
132 Allow selection of multiple filenames in file selection dialog
133
134 --directory
135 Activate directory-only selection
136
137 --save Activate save mode
138
139 --separator=SEPARATOR
140 Specify separator character when returning multiple filenames
141
142 --confirm-overwrite
143 Confirm file selection if filename already exists
144
145
146 Info options
147
148 --text=STRING
149 Set the dialog text
150
151 --no-wrap
152 Do not enable text wrapping
153
154
155 List options
156
157
158 --text=STRING
159 Set the dialog text
160
161 --column=STRING
162 Set the column header
163
164 --checklist
165 Use check boxes for first column
166
167 --radiolist
168 Use radio buttons for first column
169
170 --separator=STRING
171 Set output separator character
172
173 --multiple
174 Allow multiple rows to be selected
175
176 --editable
177 Allow changes to text
178
179 --print-column=STRING
180 Specify what column to print to standard output. The default is
181 to return the first column. 'ALL' may be used to print all col‐
182 umns.
183
184 --hide-column=NUMBER
185 Hide a specific column
186
187
188 Notification options
189
190
191 --text=STRING
192 Set the notification text
193
194 --listen
195 Listen for commands on stdin
196
197
198 Progress options
199
200
201 --text=STRING
202 Set the dialog text
203
204 --percentage=INT
205 Set initial percentage
206
207 --auto-close
208 Close dialog when 100% has been reached
209
210 --auto-kill
211 Kill parent process if cancel button is pressed
212
213 --pulsate
214 Pulsate progress bar
215
216
217 Question options
218
219
220 --text=STRING
221 Set the dialog text
222
223 --no-wrap
224 Do not enable text wrapping
225
226
227 Text options
228
229
230 --filename=FILENAME
231 Open file
232
233 --editable
234 Allow changes to text
235
236
237 Warning options
238
239
240 --text=STRING
241 Set the dialog text
242
243 --no-wrap
244 Do not enable text wrapping
245
246
247 Scale options
248
249
250 --text=STRING
251 Set the dialog text
252
253 --value=VALUE
254 Set initial value
255
256 --min-value=VALUE
257 Set minimum value
258
259 --max-value=VALUE
260 Set maximum value
261
262 --step=VALUE
263 Set step size
264
265 --print-partial
266 Print partial values
267
268 --hide-value
269 Hide value
270
271
272 Miscellaneous options
273
274
275 -?, --help
276 Show summary of options.
277
278 --about
279 Display an about dialog.
280
281 --version
282 Show version of program.
283
284
285 Also the standard GTK+ options are accepted.
286
287
289 Normally, zenity detects the terminal window from which it was launched
290 and keeps itself above that window. This behavior can be disabled by
291 unsetting the WINDOWID environment variable.
292
293
295 Display a file selector with the title Select a file to remove. The
296 file selected is returned on standard output.
297
298 zenity --title="Select a file to remove" --file-selection
299
300 Display a text entry dialog with the title Select Host and the text
301 Select the host you would like to flood-ping. The entered text is
302 returned on standard output.
303
304 zenity --title "Select Host" --entry --text "Select the host
305 you would like to flood-ping"
306
307 Display a dialog, asking Microsoft Windows has been found! Would you
308 like to remove it?. The return code will be 0 (true in shell) if OK is
309 selected, and 1 (false) if Cancel is selected.
310
311 zenity --question --title "Alert" --text "Microsoft Windows
312 has been found! Would you like to remove it?"
313
314 Show the search results in a list dialog with the title Search Results
315 and the text Finding all header files....
316
317 find . -name '*.h' | zenity --list --title "Search Results"
318 --text "Finding all header files.." --column "Files"
319
320 Show an icon in the notification area
321
322 zenity --notification --window-icon=update.png --text "System
323 update necessary!"
324
325 Display a weekly shopping list in a check list dialog with Apples and
326 Oranges pre selected
327
328 zenity --list --checklist --column "Buy" --column "Item" TRUE
329 Apples TRUE Oranges FALSE Pears FALSE Toothpaste
330
331 Display a progress dialog while searching for all the postscript files
332 in your home directory
333
334 find $HOME -name '*.ps' | zenity --progress --pulsate
335
337 Zenity was written by Glynn Foster <glynn.foster@sun.com>.
338
339 This manual page was written by Ross Burton <ross@burtonini.com>.
340
341
343 gdialog(1), dialog(1)
344
345
346
347 February 1st, 2003 ZENITY(1)