Jack Hacks

Saturday, February 17, 2007, 10:48 PM - Linux
~/.bash_profile

This code would do the trick:


if [ "$TERM" = "xterm" ] ; then
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}\007"'
else
unset PROMPT_COMMAND
fi


After logon the terminal title would be updated in the form 'jack@server' and after logout the old value will be restored.
permalink  | 

<Back | 1 | 2 | Next> Last>>