I want to make a program with gui in bash | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I want to make a program with gui in bash

I am programming with bash script and I want my program to have a gui, what I need is a window that has a form to fill like a login page and after accept button clicked I want the window to change to something like a simple homepage. can anyone help me with what tools to use and give me some links and refrences? I have found zenity but it doesnt answer all of my needs.

28th Apr 2017, 11:24 PM
Mohammad Ganji
Mohammad Ganji - avatar
6 Answers
+ 2
#!/bin/bash frmdata=$(yad --title "Test Form" --form --field "Address" --field="Name") frmaddr=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $1 }') frmname=$(echo $frmdata | awk 'BEGIN {FS="|" } { print $2 }') echo $frmaddr > test.txt echo $frmname >> test.txt
28th Apr 2017, 11:29 PM
James
James - avatar
+ 1
can you explain a little about it? and about that yad command you used
28th Apr 2017, 11:57 PM
Mohammad Ganji
Mohammad Ganji - avatar
+ 1
oh and Im going to code it myself so I'd rather be more happy with some explanations and helpful answers instead of code and only code, but thanks anyway
28th Apr 2017, 11:59 PM
Mohammad Ganji
Mohammad Ganji - avatar
0
umm and I want something in that form. I ask the user to input username and password and I want the form to have a button that says 'remember me' so that if the user checks this button I cache his data and the next time he opens the app I put that as the default value.
29th Apr 2017, 12:12 AM
Mohammad Ganji
Mohammad Ganji - avatar
0
I mean yad shows a dialog box but I want a window with a text form and a checkbox and after pressing ok it will not close, just change to a new page that looks like a homepage, with a logout button for example. I don't know if I can implement such a thing with a dialog command
29th Apr 2017, 12:17 AM
Mohammad Ganji
Mohammad Ganji - avatar