Fun with the Bash Prompt

I was doing a little work recently over ssh and it occurred to me that sometimes some systems have really confusing prompts; And without having to type whoami, Its impossible to know whether the session is logged in as root (which in general is a bad idea) or if the session has run a su command. In any case, I figured that the best way to deal with this is to use the prompt to provide visual cues, which is what it was originally designed for.

My bash prompt looks like this at the moment:
\n\e[32;40m\]\d \t \e[37;1m\w \e[32;1m\]\n\u@\h \[\e[0m\]$

But on systems where I wanted my root prompt to be color coded, I edited the .bashrc in the /etc directory to contain this:

if [[ -n"${SSH_TTY}" ]]; then
    PS1=’\[33[01;35m\]\h\[33[01:34m\] \W \$[33[00m\]‘
elif [[ ${EUID} == 0 ]]; then
    PS1=’\[33[01;31m\]\h\[33[01:34m\] \W \$[33[00m\]‘
    PS1=’\[33[01;32m\]\u@\h\[33[01:34m\] \w \$[33[00m\]‘

That should color code the prompt and make it red if you are working as root. Helpful, if your doing anything potentially dangerous on the command prompt.

Going retro with Vintage Terminal


A strange game. The only winning move is not to play. How about a nice game of chess?

Vintage Terminal is an application designed to emulate the look of the IBM 5151 monitor from the heydays of computing. When life was easy and so were computers…

The application is still in a very early alpha build, but worked well on my Ubuntu 12.04 setup, and installation was relatively simple with just a few dependancies and command line kung fu needed. I’m led to believe this runs on apple computers too.

The project hosting site at contains the latest files (0.3.0 as of this post). The code needs the SDL libraries, available from and G++ to make and install the program. Heres the complete list of commands to run to get it up and running.

sudo apt-get install libsdl1.2-dev libsdl1.2debian
sudo apt-get install g++
tar -xvzf vinterm-0.3.0.tar.gz
cd vinterm-0.3.0
sudo make
sudo make install
vinterm &

Thats it, that should show you a very vintage looking terminal window, complete with scanlines and retro goodyness.

Vintage IBM 5151

Ahhh, remember these?