screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting window title in ssh'ed host


From: Christian Ebert
Subject: Re: Setting window title in ssh'ed host
Date: Tue, 15 Jul 2008 09:54:46 +0100
User-agent: Mutt/1.5.18 (2008-07-11)

* 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 address@hidden $ " , 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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]