Difference between revisions of "X windows"

From The System Administrator Zone
(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...)
 
(Editing How do you label a terminal in X windows?)
 
Line 16: Line 16:
  
 
</pre>
 
</pre>
 +
 +
[[Category:User Applications]]

Latest revision as of 03:32, 15 May 2007

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