0

I have a shell script which when executed asks user inputs and save it to a file and later it will create a docker container based on user inputs.

I have to create a simple GUI page with check boxes and text boxes to add their inputs. How can I achieve that. Can someone please help me.

3

dialog

  • dialog provides a TUI, a text user interface, which works both in text mode and in terminal windows in graphical desktops.

  • dialog is in the repository 'universe', that is activated in Ubuntu when installed, but not in live or persistent live Ubuntu.

    • Necessary only in live or persistent live Ubuntu, run

      sudo add-apt-repository universe
      

      to activate it.

  • You can install dialog

    sudo apt update
    sudo apt install dialog
    

    and you can add these command lines into your shellscript, to make them run automatically, when a customer runs your shellscript. These commands need root privileges, which may be a problem, if you have customers who lack such privileges.

    Please notice that apt is used by Ubuntu and Debian (and linux distros based on Ubuntu or Debian). Other linux distros have different tools to install programs.

  • The current version in Ubuntu 18.04.1 LTS is dialog 1.3-20171209.

  • After installation you can see the on-line manual man dialog.

zenity

  • zenity provides a GUI, a graphical user interface, which works only in graphical desktops.

  • zenity is bundled with Ubuntu, you need not install it.

  • The current version in Ubuntu 18.04.1 LTS is zenity 3.28.1.
  • See also the on-line manual man zenity.

screenshots

dialog:

enter image description here

zenity:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.