Skip to content

Instantly share code, notes, and snippets.

@sschueller
Last active December 11, 2021 15:46
Show Gist options
  • Save sschueller/8fdc56a416510c0cce6bc2e4c2d96771 to your computer and use it in GitHub Desktop.
Save sschueller/8fdc56a416510c0cce6bc2e4c2d96771 to your computer and use it in GitHub Desktop.
Cool Retro Term on RPI 3 with Arch Linux

Install

The following steps should get you running with a decent performing cool-retro-term like in this video: https://www.youtube.com/watch?v=NVUPV3yJv04 . Thanks to @sirspudd for all the work.

  1. Install Arch Linux following https://archlinuxarm.org/platforms/armv8/broadcom/raspberry-pi-3 (Do not use "AArch64" version or it will not work)
  2. Add repo
cat <<EOF >> /etc/pacman.conf

[qpi]
SigLevel = Optional
Server = http://s3.amazonaws.com/spuddrepo/repo/\$arch
EOF
  1. Update pacman and installed packages, reboot afterwards
pacman -Syu
  1. Install cool retro term
pacman -S cool-retro-term-git
  1. Install qt (pick defaults)
pacman -S qt qtermwidget 
  1. Install cool retro term again (uninstall -git version), It may be possible to skip the "-git" version all together but I have not tested if all the dependecies needed would be present.
pacman -S cool-retro-term
  1. Run cool-retro-term
/usr/bin/cool-retro-term -platform eglfs

Extras

Auto login

mkdir -p /etc/systemd/system/getty@tty1.service.d/
  1. Edit/create /etc/systemd/system/getty@tty1.service.d/override.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin yourusername --noclear %I $TERM
systemctl daemon-reload
systemctl enable getty@tty1
reboot

Disable Rainbow splash

Edit /boot/config.txt and add

disable_splash=1

Silent Boot

Edit /boot/cmdline.txt and add

quiet loglevel=3 vga=current

Hide mouse cursor

Set Env before starting cool-retro-term

export QT_QPA_EGLFS_HIDECURSOR=1

Auto start cool-retro-term after login on tty1

Edit /etc/bash.bashrc or .bashrc if your user has one

if [[ $(tty) = /dev/pts/0 ]]; then
    export QT_QPA_EGLFS_HIDECURSOR=1
    /usr/bin/cool-retro-term -platform eglfs
fi

Play sounds on keystroke

pacman -S omxplayer
pacman -S openal alure libxtst base-devel git
git clone https://github.com/wertarbyte/triggerhappy.git
make
cp thd /usr/local/bin
mkdir -p /etc/triggerhappy.d/

Make config: /etc/triggerhappy.d/sounds.conf

# key, state, comand to run
KEY_N    1    /usr/bin/omxplayer -o local /home/alarm/mysound.ogg  > /dev/null

Play sounds on screen output (Carefull !!this writes everything into /tmp/!!)

Edit: /etc/script.sh

#!/bin/bash

$(stat -c %y /tmp/log.txt > /tmp/update.txt)

while :
do
    now=$(stat -c %y /tmp/log.txt)
    update=$(cat /tmp/update.txt)
    if [ "$now" != "$update" ]
    then
        $(stat -c %y /tmp/log.txt > /tmp/update.txt)
        $(/usr/bin/omxplayer -o local /home/alarm/mysoundsfile.ogg  > /dev/null)
    fi
done

Auto start script and log, Edit /etc/bash.bashrc or .bashrc if your user has one

if [ $SHLVL == 1 ]
then
    touch /tmp/log.txt
    script -afq /tmp/log.txt #log everything that happens in the shell
fi

#call my script only once by checking for another instance of it

if [[ ! $(pidof -x script.sh) ]]
then
    /etc/script.sh&
fi

Start cool-retro-term with other build in profile

The Arch repo has an older version (v1.1.1) so the profile need to match this.

The following are build in:

"Default Amber"
"Monochrome Green"
"Green Scanlines"
"Default Pixelated"
"Apple ]["
"Vintage"
"IBM Dos"
"IBM 3278"
"Futuristic"

Use like this:

/usr/bin/cool-retro-term -platform eglfs --profile "Futuristic"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment