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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












4















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?










share|improve this question




























    4















    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?










    share|improve this question


























      4












      4








      4


      2






      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 1 '13 at 17:01









      Zelda

      4,8021526




      4,8021526










      asked Dec 1 '13 at 16:48









      UfoguyUfoguy

      5962818




      5962818




















          3 Answers
          3






          active

          oldest

          votes


















          7














          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.






          share|improve this answer

























          • 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


















          2














          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.






          share|improve this answer


















          • 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


















          0














          Try this:



          yad --form 
          --field User ""
          --field Password:H ""
          --field "Sign Automatically?":CHK FALSE





          share|improve this answer






















            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
            );



            );













            draft saved

            draft discarded


















            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









            7














            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.






            share|improve this answer

























            • 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















            7














            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.






            share|improve this answer

























            • 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













            7












            7








            7







            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.






            share|improve this answer















            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.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            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

















            • 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













            2














            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.






            share|improve this answer


















            • 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















            2














            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.






            share|improve this answer


















            • 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













            2












            2








            2







            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.






            share|improve this answer













            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.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 1 '13 at 17:01









            slmslm

            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












            • 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











            0














            Try this:



            yad --form 
            --field User ""
            --field Password:H ""
            --field "Sign Automatically?":CHK FALSE





            share|improve this answer



























              0














              Try this:



              yad --form 
              --field User ""
              --field Password:H ""
              --field "Sign Automatically?":CHK FALSE





              share|improve this answer

























                0












                0








                0







                Try this:



                yad --form 
                --field User ""
                --field Password:H ""
                --field "Sign Automatically?":CHK FALSE





                share|improve this answer













                Try this:



                yad --form 
                --field User ""
                --field Password:H ""
                --field "Sign Automatically?":CHK FALSE






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 28 at 17:34









                julionevesjulioneves

                1




                1



























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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






                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)