Yad密码对话窗口案例

时间:2017-03-03 11:00:25

标签: dialog passwords yad

我想创建一个密码对话框窗口,根据密码值执行不同的脚本。

例如,当用户输入123时,123.sh将被执行,等等。

我该怎么做?

1 个答案:

答案 0 :(得分:0)

man yad是一个非常好的资源。此外,你会在这里找到很多有关解释的例子:http://smokey01.com/yad/

您所描述内容的小型演示:

$ 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
相关问题