* Gokdeniz Karadag on Saturday, July 12, 2008 at 03:10:00 +0300
> Setting the following in all machines achieves what I want, it sets 
> screen title to hostname,
> PROMPT_COMMAND='echo -n -e "\033k${HOSTNAME}\033\\"'
> but when I connect to the machine out of screen, It prints the hostname
> literally, so the prompt becomes like "hostname [EMAIL PROTECTED] $ " , which 
> is
> ugly and redundant.
> 
> To ensure that only ssh sessions within a GNU screen get the "title setter
> prompt command", environment variables are useful, I can use the TERM 
> variable,
> but in stable debian, the default TERM=screen breaks vim editor, it goes crazy
> when you press home, or pageup buttons.  Using TERM=xterm fixes this, so I
> cannot check for TERM being equal to "screen".

Does checking for $STY work for your purposes?

if [ -n "$STY" ]
   <screen specific stuff>
fi

c
-- 
  Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]

_F R E E_  _V I D E O S_  -->>  http://www.blacktrash.org/underdogma/


_______________________________________________
screen-users mailing list
screen-users@gnu.org
http://lists.gnu.org/mailman/listinfo/screen-users

Reply via email to