Retro terminal

Project repository: https://gitlab.com/qnx/projects/simple-terminal.git

Simple Terminal is a QNX port of a simple terminal written for use with X11 desktops.

The purpose of this project is to give the simple terminal a retro look, by modifying the simple-terminal folder included in the qnxuser projects folder.

Note:

To copy and paste the following commands, open the simple-terminal.md file in the ~/projects/READMEs folder.

Prerequisites

Before building this project, run the following command in the terminal to install the necessary dependencies:

sudo apk add ncurses-dev qnx-screen-dev

Then, follow these steps to set up the project:

  1. Navigate to the project folder:

    cd ~/projects/simple-terminal
  2. Build the project:

    make
  3. Install the executable and its related files:

    sudo make install

Editing and building with Geany

  1. Open the File menu, select Open, then open screen.c:



  2. Make the following updates to screen.c:

    1. Find the color enumerations and add these entries to the end of the existing list:

      MONO_P1_GREEN,
      MONO_P3_AMBER,
      MONO_P4_WHITE,
      MONO_VT100_LIGHT_GRAY,
      MONO_VT100_LIGHT_BLUE,
      MONO_VT100_WHITE,
    2. Find the NUM_COLOURS macro and change the value to 26:

      #define NUM_COLOURS 26
    3. Find the init_colours() function and add the array entries corresponding to the new enumerations at the end of the function:

      colours[ROLE(MONO_P1_GREEN)] = (colour_t){ 0.2, 1.0, 0.4 };
      colours[ROLE(MONO_P3_AMBER)] = (colour_t){ 1.0, 1.0, 0.4 };
      colours[ROLE(MONO_P4_WHITE)] = (colour_t){ 1.0, 1.0, 1.0 };
      colours[ROLE(MONO_VT100_LIGHT_GRAY)] = (colour_t){ 0.866666667, 0.866666667, 0.866666667 };
      colours[ROLE(MONO_VT100_LIGHT_BLUE)] = (colour_t){ 0.6, 0.866666667, 1.0 };
      colours[ROLE(MONO_VT100_WHITE)] = (colour_t){ 1.0, 1.0, 1.0 };
    4. Find the xdrawcursor() function and make this change:

      //g.bg = CURSOR;
      g.bg = MONO_P1_GREEN;
  3. Open the config.c file the same way you opened screen.c in the previous step. Then, make the following updates:

    1. Append the following lines to the colorname array:

      "#33ff66", /* Green phosphor (P1) monochrome terminal */
      "#ffff33", /* Amber phosphor (P3) monochrome terminal */
      "#ffffff", /* White phosphor (P4) monochrome terminal */
      "#dddddd", /* DEC VT100 light gray monochrome terminal */
      "#99ddff", /* DEC VT100 light blue monochrome terminal */
      "#ffffff", /* DEC VT100 white monochrome terminal */
    2. Change the default foreground color a few lines below the above snippet:

      //unsigned int defaultfg = 258;
      unsigned int defaultfg = 260;
  4. Save your changes.

  5. Open the Build menu and select Make:



  6. Open the Build menu again and select Make Custom Target. Type Install in the field and click OK:



  7. When prompted, enter your password to give the operation root permissions.

  8. Shut down or log out of the desktop to return to the demolauncher. Then, click the terminal icon ().

  9. A green, retro terminal is displayed:



Page updated: