Wookie
Wookie

Reputation: 41

Yad password dialog window cases

I'd like to create a password dialog window, that would execute different scripts according to password value.

For example, when user enter 123, then 123.sh will be executed, etc.

How can I do that?

Upvotes: 0

Views: 1879

Answers (1)

George Vasiliou
George Vasiliou

Reputation: 6345

man yad is a very good resource. Moreover you will find a lot of yad examples with explanation here : http://smokey01.com/yad/

A small demo of what you described:

$ echo "echo hello" >1.sh && chmod +x 1.sh

$ ./1.sh
hello

$ res=$(yad --entry --entry-text="giveme a number" --hide-text)
# yad window opens - type 1 & enter    

$ ./"$res".sh
hello

Upvotes: 1

Related Questions