Zenity

From Free Knowledge Base- The DUCK Project: information for everyone
Revision as of 13:26, 30 December 2018 by Admin (Talk | contribs)

Jump to: navigation, search

zenity (lower-case z) / formerly gdialog - have graphical GTK+ dialog boxes in command-line and shell scripts. Zenity adds graphical interfaces to shell scripts with a single command. Zenity is an open source and a cross-platform application


sample scripts

#!/bin/bash 
first=$(zenity --title="Your's First Name" --text "What is your first name?" --entry) 
zenity --info --title="Welcome" --text="Mr./Ms. $first" 
last=$(zenity --title="Your's Last Name" --text "$first what is your last name?" --entry) 
zenity --info --title="Nice Meeting You" --text="Mr./Ms. $first $last"