How to Install yad(shell script gui) on centos6/Rhel/Fedora
YAD is a program that will display GTK+ dialogs, and return (either in
the return code, or on standard output) the users input. This allows you
to present information, and ask for information from the user, from all manner of shell scripts.
YAD is the fork of Zenity program.
#cd /opt
#wget https://yad.googlecode.com/files/yad-0.25.1.tar.xz
#tar -xvf yad-0.25.1.tar.xz
#cd yad-0.25.1
#./configure
#make
#make install
you can read manual of yad by below command
#man yad /*for how to use*/
examples for how to use yad
#yad --calendar
example script to get the
#!/bin/bash
frmdata=$(yad --title "Login" --form --field "Username" --field="Password")
frmaddr=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $1 }')
frmname=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $2 }')
echo $frmaddr > test.txt
echo $frmname >> test.txt
No comments:
Post a Comment