titlebar and titletip shows "None"

Created by chantra on on 2009-04-05
titlebar None terminator
Last updated by:
chantra on on 2009-04-05

The titlebar is dependant on the environment variable PROMPT_COMMAND.
If this variable is not set, The titlebar will display "None".
This issue might happen on freshly installed distro that comes with an almost empty ~/.bashrc

To fix this, one must add the following to ~/.bashrc

# If this is an xterm set the title to user@host:dir
case "$TERM" in
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'