How do I create a dialog with multiple text fields using zenity?

Clash Royale CLAN TAG#URR8PPP
I want to crate a GUI for some command line programs and I need to get info from multiple text fields e.g. 'Username', 'Password' and a checkbox 'Sign automatically?'.
I need to set particular variables in my script equal to the respective text fields' input by the user e.g. user, pass, login. Also it would have an OK button and a Quit button.
How can I realise this this? I searched online and I was able to find only examples with one text field?
bash command-line gui zenity
add a comment |
I want to crate a GUI for some command line programs and I need to get info from multiple text fields e.g. 'Username', 'Password' and a checkbox 'Sign automatically?'.
I need to set particular variables in my script equal to the respective text fields' input by the user e.g. user, pass, login. Also it would have an OK button and a Quit button.
How can I realise this this? I searched online and I was able to find only examples with one text field?
bash command-line gui zenity
add a comment |
I want to crate a GUI for some command line programs and I need to get info from multiple text fields e.g. 'Username', 'Password' and a checkbox 'Sign automatically?'.
I need to set particular variables in my script equal to the respective text fields' input by the user e.g. user, pass, login. Also it would have an OK button and a Quit button.
How can I realise this this? I searched online and I was able to find only examples with one text field?
bash command-line gui zenity
I want to crate a GUI for some command line programs and I need to get info from multiple text fields e.g. 'Username', 'Password' and a checkbox 'Sign automatically?'.
I need to set particular variables in my script equal to the respective text fields' input by the user e.g. user, pass, login. Also it would have an OK button and a Quit button.
How can I realise this this? I searched online and I was able to find only examples with one text field?
bash command-line gui zenity
bash command-line gui zenity
edited Dec 1 '13 at 17:01
Zelda
4,8021526
4,8021526
asked Dec 1 '13 at 16:48
UfoguyUfoguy
5962818
5962818
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Basically, you can use multi-entry forms using Zenity. A form can be built using text fields, password fields, and calendars. Text fields can be added with the --add-entry flag. Password fields are added with the --add-password flag, and calandars are added with the --add-calendar flag.
$ zenity --forms --title="Create user" --text="Add new user"
--add-entry="First Name"
--add-entry="Last Name"
--add-entry="Username"
--add-password="Password"
--add-password="Confirm Password"
--add-calendar="Expires"
Zenity form
Here is a tutorial that might help you out.
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
– HalosGhost
Jan 14 '15 at 20:19
1
Is that better @HalosGhost and if so then can you up vote
– Jhondoe
Jan 14 '15 at 20:31
This looks much better. However, if you got the idea from the page you linked to originally, you should still include the link as a source reference.
– HalosGhost
Jan 14 '15 at 21:04
What? <filler text>
– HalosGhost
Jan 14 '15 at 21:06
I no longer have the link@HalosGhost
– Jhondoe
Jan 14 '15 at 21:06
|
show 2 more comments
I do not believe you can do this using Zenity. It's meant for simple GUI's and isn't really a full fledged GUI environment. You'll either have to change the flow of your tool or use GTK+ directly to get your desired results.
1
do you believe the extra functionalities of yad could suffice? as the questioner stated, it is for command line programs, and so, that extra complexity is certainly not required.
– Aquarius Power
Nov 29 '15 at 5:35
add a comment |
Try this:
yad --form
--field User ""
--field Password:H ""
--field "Sign Automatically?":CHK FALSE
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f103277%2fhow-do-i-create-a-dialog-with-multiple-text-fields-using-zenity%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Basically, you can use multi-entry forms using Zenity. A form can be built using text fields, password fields, and calendars. Text fields can be added with the --add-entry flag. Password fields are added with the --add-password flag, and calandars are added with the --add-calendar flag.
$ zenity --forms --title="Create user" --text="Add new user"
--add-entry="First Name"
--add-entry="Last Name"
--add-entry="Username"
--add-password="Password"
--add-password="Confirm Password"
--add-calendar="Expires"
Zenity form
Here is a tutorial that might help you out.
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
– HalosGhost
Jan 14 '15 at 20:19
1
Is that better @HalosGhost and if so then can you up vote
– Jhondoe
Jan 14 '15 at 20:31
This looks much better. However, if you got the idea from the page you linked to originally, you should still include the link as a source reference.
– HalosGhost
Jan 14 '15 at 21:04
What? <filler text>
– HalosGhost
Jan 14 '15 at 21:06
I no longer have the link@HalosGhost
– Jhondoe
Jan 14 '15 at 21:06
|
show 2 more comments
Basically, you can use multi-entry forms using Zenity. A form can be built using text fields, password fields, and calendars. Text fields can be added with the --add-entry flag. Password fields are added with the --add-password flag, and calandars are added with the --add-calendar flag.
$ zenity --forms --title="Create user" --text="Add new user"
--add-entry="First Name"
--add-entry="Last Name"
--add-entry="Username"
--add-password="Password"
--add-password="Confirm Password"
--add-calendar="Expires"
Zenity form
Here is a tutorial that might help you out.
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
– HalosGhost
Jan 14 '15 at 20:19
1
Is that better @HalosGhost and if so then can you up vote
– Jhondoe
Jan 14 '15 at 20:31
This looks much better. However, if you got the idea from the page you linked to originally, you should still include the link as a source reference.
– HalosGhost
Jan 14 '15 at 21:04
What? <filler text>
– HalosGhost
Jan 14 '15 at 21:06
I no longer have the link@HalosGhost
– Jhondoe
Jan 14 '15 at 21:06
|
show 2 more comments
Basically, you can use multi-entry forms using Zenity. A form can be built using text fields, password fields, and calendars. Text fields can be added with the --add-entry flag. Password fields are added with the --add-password flag, and calandars are added with the --add-calendar flag.
$ zenity --forms --title="Create user" --text="Add new user"
--add-entry="First Name"
--add-entry="Last Name"
--add-entry="Username"
--add-password="Password"
--add-password="Confirm Password"
--add-calendar="Expires"
Zenity form
Here is a tutorial that might help you out.
Basically, you can use multi-entry forms using Zenity. A form can be built using text fields, password fields, and calendars. Text fields can be added with the --add-entry flag. Password fields are added with the --add-password flag, and calandars are added with the --add-calendar flag.
$ zenity --forms --title="Create user" --text="Add new user"
--add-entry="First Name"
--add-entry="Last Name"
--add-entry="Username"
--add-password="Password"
--add-password="Confirm Password"
--add-calendar="Expires"
Zenity form
Here is a tutorial that might help you out.
edited Jan 14 '15 at 21:15
answered Jan 14 '15 at 19:56
JhondoeJhondoe
1311210
1311210
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
– HalosGhost
Jan 14 '15 at 20:19
1
Is that better @HalosGhost and if so then can you up vote
– Jhondoe
Jan 14 '15 at 20:31
This looks much better. However, if you got the idea from the page you linked to originally, you should still include the link as a source reference.
– HalosGhost
Jan 14 '15 at 21:04
What? <filler text>
– HalosGhost
Jan 14 '15 at 21:06
I no longer have the link@HalosGhost
– Jhondoe
Jan 14 '15 at 21:06
|
show 2 more comments
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
– HalosGhost
Jan 14 '15 at 20:19
1
Is that better @HalosGhost and if so then can you up vote
– Jhondoe
Jan 14 '15 at 20:31
This looks much better. However, if you got the idea from the page you linked to originally, you should still include the link as a source reference.
– HalosGhost
Jan 14 '15 at 21:04
What? <filler text>
– HalosGhost
Jan 14 '15 at 21:06
I no longer have the link@HalosGhost
– Jhondoe
Jan 14 '15 at 21:06
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
– HalosGhost
Jan 14 '15 at 20:19
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
– HalosGhost
Jan 14 '15 at 20:19
1
1
Is that better @HalosGhost and if so then can you up vote
– Jhondoe
Jan 14 '15 at 20:31
Is that better @HalosGhost and if so then can you up vote
– Jhondoe
Jan 14 '15 at 20:31
This looks much better. However, if you got the idea from the page you linked to originally, you should still include the link as a source reference.
– HalosGhost
Jan 14 '15 at 21:04
This looks much better. However, if you got the idea from the page you linked to originally, you should still include the link as a source reference.
– HalosGhost
Jan 14 '15 at 21:04
What? <filler text>
– HalosGhost
Jan 14 '15 at 21:06
What? <filler text>
– HalosGhost
Jan 14 '15 at 21:06
I no longer have the link@HalosGhost
– Jhondoe
Jan 14 '15 at 21:06
I no longer have the link@HalosGhost
– Jhondoe
Jan 14 '15 at 21:06
|
show 2 more comments
I do not believe you can do this using Zenity. It's meant for simple GUI's and isn't really a full fledged GUI environment. You'll either have to change the flow of your tool or use GTK+ directly to get your desired results.
1
do you believe the extra functionalities of yad could suffice? as the questioner stated, it is for command line programs, and so, that extra complexity is certainly not required.
– Aquarius Power
Nov 29 '15 at 5:35
add a comment |
I do not believe you can do this using Zenity. It's meant for simple GUI's and isn't really a full fledged GUI environment. You'll either have to change the flow of your tool or use GTK+ directly to get your desired results.
1
do you believe the extra functionalities of yad could suffice? as the questioner stated, it is for command line programs, and so, that extra complexity is certainly not required.
– Aquarius Power
Nov 29 '15 at 5:35
add a comment |
I do not believe you can do this using Zenity. It's meant for simple GUI's and isn't really a full fledged GUI environment. You'll either have to change the flow of your tool or use GTK+ directly to get your desired results.
I do not believe you can do this using Zenity. It's meant for simple GUI's and isn't really a full fledged GUI environment. You'll either have to change the flow of your tool or use GTK+ directly to get your desired results.
answered Dec 1 '13 at 17:01
slm♦slm
251k69529685
251k69529685
1
do you believe the extra functionalities of yad could suffice? as the questioner stated, it is for command line programs, and so, that extra complexity is certainly not required.
– Aquarius Power
Nov 29 '15 at 5:35
add a comment |
1
do you believe the extra functionalities of yad could suffice? as the questioner stated, it is for command line programs, and so, that extra complexity is certainly not required.
– Aquarius Power
Nov 29 '15 at 5:35
1
1
do you believe the extra functionalities of yad could suffice? as the questioner stated, it is for command line programs, and so, that extra complexity is certainly not required.
– Aquarius Power
Nov 29 '15 at 5:35
do you believe the extra functionalities of yad could suffice? as the questioner stated, it is for command line programs, and so, that extra complexity is certainly not required.
– Aquarius Power
Nov 29 '15 at 5:35
add a comment |
Try this:
yad --form
--field User ""
--field Password:H ""
--field "Sign Automatically?":CHK FALSE
add a comment |
Try this:
yad --form
--field User ""
--field Password:H ""
--field "Sign Automatically?":CHK FALSE
add a comment |
Try this:
yad --form
--field User ""
--field Password:H ""
--field "Sign Automatically?":CHK FALSE
Try this:
yad --form
--field User ""
--field Password:H ""
--field "Sign Automatically?":CHK FALSE
answered Jan 28 at 17:34
julionevesjulioneves
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f103277%2fhow-do-i-create-a-dialog-with-multiple-text-fields-using-zenity%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown