titlebar and titletip shows "None"

Created by chantra
Keywords:
titlebar None terminator
Last updated by:
chantra

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
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac