How to create GUI dialog boxes in bash scripts with Whiptail in Linux

Click for: original source

In this article, we are going to discuss yet another GUI utility called Whiptail that can be used to create GUI dialog boxes in Bash scripts in Linux. By Karthick.

Not every script that you write needs a frontend graphical interface. But sometimes it would be better if you create a graphical interface instead of relying on interacting with the command line. In my case, if there is a long list of responses needed in the script I would choose to go with a graphical interface.

This is step by step tutorial which covers:

  • Install Whiptail in Linux
  • Message box
  • Info box
  • Yes/No box
  • Text box
  • Redirections
  • Password box
  • Input box
  • Checklist dialog box
  • Radio list dialog box
  • Menu dialog box
  • Progress bar

Whiptail is a friendly GUI utility that uses a newt programming library. Whiptail offers different dialog boxes for different purposes. Depending upon your use case you can use these dialog boxes to make your script more interactive. In this article we have briefly seen how to use Whiptail to create various dialog boxes in bash scripts. Good read!

[Read More]

Tags linux devops frameworks software miscellaneous ux