[Top][All Lists]

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

Re: Setting title for ssh windows

From: Mikael Schönenberg
Subject: Re: Setting title for ssh windows
Date: Wed, 24 Aug 2005 00:33:22 +0200

On 8/23/05, Svend Sorensen <address@hidden> wrote:

> Is it possible to automatically set the title of a ssh window to the
> hostname of the remote machine?  How would this be done?

Sort of.

Have a look at the section named "TITLES (naming windows)" in the man
file. It discusses setting window titles dynamically in various ways.

Specifically, it mentions the title-string escape-sequence
<esc>kname<esc>\ which modifies the title of the window - so if that
sequence appeared somewhere before, during or after connecting to the
remote host, you'd could have your window named after the host.

The easiest way to do this might be shell dependant. I'm a bash user,
so the first thing that pops up in my mind is to set the environment
variable PROMPT_COMMAND on the remote host to something like: echo -n
-e "\033k`uname -n`\033\134". zsh users can probably use that magic
command wrapping of theirs to accomplish something on the client side
(which may be a bit neater).

And, of course, there might be other ways I can't think of right now.
There always is :)

Mikael Schönenberg

reply via email to

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