Zenity: Red Hat Enterprise Linux 8.4
Zenity is an open-source program(command) of Linux that will display the GTK+(graphical Program of Linux) dialogs box, and return the user input.
It allows quick creation of quick GUI (Graphical User Interface)
Zenity is preinstalled in Linux it is present in Windows and Mac operating systems.
The command “man zenity” will allow the user to walk through the manual of zenity
Commands which can be explored in Zenity
zenity --info :- It checks for updates
zenity — calendar:- It shows calendar on the screen.
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-’).
Dialog options
— calendarDisplay calendar dialog
— entryDisplay text entry dialog
— errorDisplay error dialog
— file-selectionDisplay file selection dialog
— infoDisplay info dialog
— listDisplay list dialog
— notificationDisplay notification
— progressDisplay progress indication dialog
— questionDisplay question dialog
— text-infoDisplay text information dialog
— warningDisplay warning dialog
— scaleDisplay scale dialog
— color-selectionDisplay color selection dialog
— passwordDisplay password dialog
— formsDisplay forms dialog
General options
— title=TITLESet the dialog title — window-icon=ICONPATHSet the window icon with the path to an image. Alternatively, one of the four stock icons can be used: ‘error’, ‘info’, ‘question’ or ‘warning’ — width=WIDTHSet the dialog width — height=HEIGHTSet the dialog height — timeout=TIMEOUTSet the dialog timeout in seconds
Calendar options
— text=STRINGSet the dialog text — day=INTSet the calendar day — month=INTSet the calendar month — year=INTSet the calendar year — date-format=PATTERNSet 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
Text entry options
— text=STRINGSet the dialog text — entry-text=STRINGSet the entry text — hide-textHide the entry text
Error options
— text=STRINGSet the dialog text — no-wrapDo not enable text wrapping — no-markupDo not enable pango markup
File selection options
— filename=FILENAMESet the file or directory to be selected by default — multipleAllow selection of multiple filenames in file selection dialog — directoryActivate directory-only selection — saveActivate save mode — separator = SEPARATORSpecify separator character when returning multiple filenames — confirm-overwriteConfirm file selection if filename already exists — file-filter=NAME | PATTERN1 PATTERN2Sets a filename filter
Info options
— text=STRINGSet the dialog text
— no-wrapDo not enable text wrapping
— no-markupDo not enable pango markup
List options
— text=STRINGSet the dialog text
— column=STRINGSet the column header
— checklistUse check boxes for first column
— radiolistUse radio buttons for first column
— separator=STRINGSet output separator character
— multipleAllow multiple rows to be selected
— editableAllow changes to text
— print-column=NUMBERSpecify what column to print to standard output. The default is to return the first column. ‘ALL’ may be used to print all columns.
— hide-column=NUMBERHide a specific column
— hide-headerHides the column headers
Notification options
— text=STRINGSet the notification text
— listenListen 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’
Progress options
— text=STRINGSet the dialog text
— percentage=INTSet initial percentage
— auto-closeClose dialog when 100% has been reached
— auto-killKill parent process if cancel button is pressed
— pulsatePulsate progress bar
— no-cancelHides the cancel button
Question options
— text=STRINGSet the dialog text
— no-wrapDo not enable text wrapping
— no-markupDo not enable pango markup
— ok-labelSet the text of the OK button
— cancel-labelSet the text of the cancel button
Text options
— filename=FILENAMEOpen file — editableAllow changes to text — checkbox=TEXTEnable a checkbox for use like a ‘I read and accept the terms.’ — ok-labelSet the text of the OK button — cancel-labelSet the text of the cancel button
Warning options
— text=STRINGSet the dialog text
— no-wrapDo not enable text wrapping
— no-markupDo not enable pango markup
Scale options
— text=STRINGSet the dialog text — value=VALUESet initial value — min-value=VALUESet minimum value — max-value=VALUESet maximum value — step=VALUESet step size — print-partialPrint partial values — hide-valueHide value
Color selection options
— color=VALUESet the initial color
— show-paletteShow the palette
Password dialog options
— usernameDisplay the username field
Forms dialog options
— add-entry=FIELDNAMEAdd a new Entry in forms dialog — add-password=FIELDNAMEAdd a new Password Entry in forms dialog — add-calendar=FIELDNAMEAdd a new Calendar in forms dialog — text=STRINGSet the dialog text — separator=STRINGSet output separator character — forms-date-format=PATTERNSet 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
Miscellaneous options
- ?, — helpShow summary of options.
- — aboutDisplay an about dialog.
- — versionShow version of program.
Also the standard GTK+ options are accepted. For more information about the GTK+ options, execute following command.
zenity — help-gtk