X windows

From The System Administrator Zone
Revision as of 07:46, 5 May 2007 by Sakshale (talk | contribs) (New page: == Editing How do you label a terminal in X windows? == Stick these lines in your '''~/.bashrc''' (assuming you use bash) <pre> if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TER...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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