Difference between revisions of "Zenity"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m
m (sample scripts)
Line 5: Line 5:
  
 
=== sample scripts ===
 
=== 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"
 +
 +
 +
  
  

Revision as of 12:26, 30 December 2018

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"