Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'And For Your Remote Server...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
And For Your Remote Server...
Authored by: thinkyhead on May 24, '02 04:12:41AM

Replace the call to OSASCRIPT with this line in BASH:

<b>echo -e "\033]0;$1\007"</b>

or this line for CSH, ZSH, etc.:

<b>echo -n "^[]0;$1^G"</b>

Note that ^[ is actually the <b>esc</b> character and ^G is <b>ctrl-G</b>.To enter these characters use <b>vi</b> and use the following sequences for each:

^[ ........ <b>ctrl-v - esc</b>
^G ...... <b>ctrl-v - ctrl-g</b>

Now when you connect to your remote host you can have your .login or .bashrc file set the Terminal title to the name of the remote server.

In tchs this command will make the Terminal title always show the current directory:

<b>alias precmd 'echo -n "^[]1;$PWD^G"'</b>

Use the same trick for esc and ctrl-G.



[ Reply to This | # ]