On 8/23/06, Luke Vanderfluit <[EMAIL PROTECTED]> wrote:
I use lots of xterms on my screen.
I'd like to be able to change the title of the xterm window, by type in it at 
the prompt.

Anyone know how to do this?

Going back to ancient history, I found this mouthfull in my .cshrc file

set frobnicate = "some string"
set prompt="%{\e]2\;${frobnicate}^g\e]1\;%m^g\r%}%B%m:%n:%c4:%h%#%b "

You need to send control chars to the xterm, you can do that via the
prompt under tcsh.  That doesn't translate directly into bash, but
should start you on the right track.

Alternatively you can google for "xterm bash title change" and feel
lucky.   Reading http://www.faqs.org/docs/Linux-mini/Xterm-Title.html
tells us that:

PROMPT_COMMAND='echo -ne "\033]0;${FROBNICATE}\007"'
FROBNICATE="some string"

What is quite useful is that you only need to change ${FROBNICATE} to
change the title dynamically.

HTH,

Michael...
--
Michael Davies               "Do what you think is interesting, do
mailto:[EMAIL PROTECTED]   something that you think is fun and
http://michaeldavies.org      worthwhile, because otherwise you won't
                             do it well anyway." -- Brian Kernighan
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to