Terminal fun

W00T!  Okay, not actually fun, and not terminal as in deathly.

I’m talking about the Terminal Emulator that comes with every Linux distribution.  It’s similar to the Command Prompt, for all those Windows users who have seen that.  As much as I prefer to never use it, sometimes I do.  It appears every time I use WinFF to extract the audio from video files, for example.  And I also need to use the terminal to convert  .toc files to .iso files using toc2cue and bchunk.

And since I’m using a replica Commodore 64…

C64x_side

I had already customized the terminal’s colours to match the old-school Commodore 64 home screen:

BUv00bk

My terminal started out looking like this:

yvgKoqC

I was aware that the text inside the window could be customized, but I had no idea how to accomplish this.  So I went to Reddit and posted a question in /r/asklinux.  And about an hour later, I was able to get my terminal looking like this:

C64 Terminal

This was done simply by adding this code to the .bashrc file in my home folder:

PS1="READY.\n"

FREEMEM=$(free | grep buffers |tail -1| tr -s '[:space:]' | cut -d " " -f 4)
TOTALMEM=$(free | grep Mem | tr -s '[:space:]' | cut -d " " -f 2)
echo \ 
echo \  \  \  \  \  \  \  \  \  \  \  \*\*\*\* COMMODORE 64 BASH V4.2.25 \*\*\*\*
echo \ 
echo \  \  \  \  \  \  \  \  \  \  \  \ ${TOTALMEM}K RAM SYSTEM ${FREEMEM}K FREE
echo \

Since that file controls whatever terminal uses Bash, the same text and info appears when I use XTerm, though the Commodore 64 font and colours are absent.

And I also went one step further and decided to customize the root terminal profile.  I made it look like an AmigaDOS window:

AmigaDOS Terminal

Neat?  Sure.  Useful?  Not particularly.  But it sure makes the terminals match the rest of my Commodore and Amiga themes, skins, icons and cursors that I have happening on this computer.

It makes me think of the “Commodore OS Vision” distro that Commodore USA released along with these replica Commodore 64s.  They didn’t do anything like this to the terminal in that OS, when it turns out to be so easy.  That distro is also quite an eyesore and a hot mess.  There are a few reasons why I didn’t keep it installed on my C64 when I got it.