X windows

From The System Administrator Zone

Editing How do you label a terminal in X windows?

Stick these lines in your ~/.bashrc (assuming you use bash)


if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "xterms" ];
then
   if [ "$DISPLAY" = ":0.0" ];
   then
      PROMPT_COMMAND='echo -ne "\033]0;<${USER}>:  ${PWD}\007"'
   else
      PROMPT_COMMAND='echo -ne "\033]0;<${USER}@${HOSTNAME}>:  ${PWD}\007"'
   fi
   export PROMPT_COMMAND
fi