TERMINAL LOCK
AIM:
-->WHILE ASKING USER FOR PASSWORD WHILE INSTALLING TERMINAL LOCK
-->EVERYTIME ASKS FOR PASSWORD WHEN WE OPEN TERMINAL
STEP 1:
-->We have to Write a Script File to Lock the Terminal Using Below Code
#!/bin/bash
This Command is Shebang is a Special Sequence of Characters .This command used to tell the kernel which interpreter should be used to run the commands present in the file.
password=$(zenity --password)
zenity is a Special Graphical Feature .zenity is a open source and a cross-platform application .Which displays GTK+ Dialog Boxes In command line or Shell Script .
-->Our password is "teju" if we entered correct password it will print Welcome teju using figlet command
figlet "Welcome Teju"
Otherwise It will print Who are you and it kills the process and it close the terminal using below command.
kill $(pgrep terminal)
Step-2:
Now our Script file is done but we have to execute the file ..but We have to give permission to the file using chmod command.
Step-3:
Now we run the Script File it asks Password but Our Aim is to asks password when we open terminal .So we have to add our script file to .bashrc file.
Now We open the terminal it will Asks Password.
Successfully We Locked the Terminal.
Aspiring JAVA DEVELOPER || Linux 🐧|| python🐍 ||Java ☕|| Robotics 🤖 || IOT || IIIT RK-VALLEY 📚 || ECE 2025 📖
3y🤩Wow.... Nice akka