CP with a Shell Script
Your first CP will contain a simple shell script that displays the message "Hello, world!" with the help of the gtkmessage utility.
- Log into Local Terminal as root.
- Change into the /custom directory: cd /custom
- Make a hello directory for your CP contents: mkdir hello
- Change into the hello directory: cd hello/
- Open a new plaintext file using the GNU Nano editor: nano hello.sh
- Put this content into the file:
gtkmessage -m "Hello, World!" -t "Hello" -o "Close"
- Save the file by pressing Ctrl+o, Return.
- Exit the GNU Nano editor by pressing Ctrl+x.
- Make the file executable: chmod a+x hello.sh
- Run the shell script from the command line to test it: ./hello.sh
A message window like the one pictured above should open. You can close it with the Close button.