Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2008 10:53:04 +0200
From:      Nikos Vassiliadis <>
Cc:        Matiss <>
Subject:   Re: Which environment variable?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Monday 14 January 2008 09:35:41 Matiss wrote:
> Is there such environment variable, which changes window title for
> putty?

No there is no such variable, that I am aware of.
You just have to send some control characters to the terminal to
change its title. How to send these characters really depends on
your shell.

> How do I change that title to let's say server name for my shell?

You could use something like this in your ~/.bash_profile if you
use bash.

echo -en "\033]0;`hostname`\007"

The above sends:
1) ASCII \033
2) ]
3) 0
4) ;
5) the_hostname
6) ASCII \007

The idea is that you should initiliaze the xterm's title at login
time. Check the page below for your favorite shell. There are even
two workaround in Perl and C in case your shell has no easy way to
send the control characters.

HTH, Nikos

Want to link to this message? Use this URL: <>