[plug] Debian sshd config

ryan at is.as.geeky.as ryan at is.as.geeky.as
Mon Mar 3 20:27:58 WST 2003


On Mon, 2003-03-03 at 18:19, Nathan Alberti wrote:
> Great, works like a charm :)
> 
> if [ $TERM = xterm ]
> then
>   echo -n "^[]0;$USER@`hostname`^G"
>   echo -n "^[]1;`hostname`^G"
> fi
> 
> Cheers Matt
> 
> Nathan.

On all my Debian boxes, the default .bashrc (/etc/skel/.bashrc) file
already has it in there, but commented out. Here's the snippet ripped
out of the case statement:

 # If this is an xterm set the title to user at host:dir
 #case $TERM in
 #xterm*)
 #    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
 #    ;;

I find the pwd display especially useful when i've got more logins to
the same server than i can count on both hands.  The PROMPT_COMMAND
method makes it update every time the prompt is displayed, so you can do
all sorts of other wacky things with it.

Ryan




More information about the plug mailing list