Linux is based on the Unix operating system, but also features a number of unique and useful kernel features and application programs that often go beyond what is available under Unix.
True to the Unix tradition of writing general-purpose tools that work together, dialog allows creating text-based color dialog boxes from any shell script language.
It supports eight types of dialogs:
yes/no boxes
menu boxes
input boxes
message boxes
text boxes
info boxes
checklist boxes
radiolist boxes
In order to run dialog, we need to install it in Ubuntu by typing the following command.
sudo apt install dialog
The syntax is as follows:
dialog --common-options --boxType "Text" Height Width —box-specific-option
--common-options are used to set dialog boxes background color, title, etc.
All dialog boxes have at least three parameters:
"Text" : The caption or contents of the box.
height : The height of the dialog box.
width : The width of the dialog box.
With the assistance of the dialog framework, create a shell script for Ubuntu that performs the following tasks in the specified sequence:
1) Provides an option for installing applications from apt (Examples of applications include cuda, python virtual environment, ffmpeg, java, python pip, etc).
2) Enables the user to create a directory and establish a virtual environment within that directory.
3) Installs various packages from pip that are related to machine learning within the specified virtual environment.
4) Initiates a Jupyter notebook in the background.