Skip to main content
Skip table of contents

"Hello World" Program

Your first Custom Partition will contain a simple shell script that displays the message "Hello, world!" with the help of the gtkmessage utility.

  1. Open the local terminal on your device and log in as root. If the local terminal has not been configured yet, see Terminals.

  2. Change into the /custom directory: cd /custom

  3. Make a hello directory for your Custom Partition contents: mkdir hello


  4. Change into the hello directory: cd hello/


  5. Open a new plaintext file using the GNU nano editor: nano hello.sh

    The colors used by default for syntax highlighting in nano may be inconvenient for reading. You can change the colors with the following command: sed -i "s#color cyan#color blue#; s#color brightyellow#color red#" /usr/share/nano/sh.nanorc

    Also, you can use the vi editor as an alternative; the commands for exiting and saving a file will be different then.

  6. Put this content into the file:

    #!/bin/bash
    gtkmessage -m "Hello, World!" -t "Hello" -o "Close"


  7. Save the file by pressing [Ctrl]+[o], [Return].

  8. Exit the GNU nano editor by pressing [Ctrl]+[x].

  9. Make the file executable: chmod a+x hello.sh


  10. Run the shell script from the command line to test it: ./hello.sh


    A message window like this should open: 


    You can close it with the Close button.

Next Step

>> Creating the Custom Application

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.