xterm titles
ZIYAD A. M. AL-BATLY
zamb at spymac.com
Sun Apr 17 15:23:46 UTC 2005
On Sun, 2005-04-17 at 07:45 -0500, Fletcher Mattox wrote:
> Hi,
>
> How does one specify the title of an xterm? As best I can tell, it
> always puts "$USER at HOST:$PWD" in the title bar, and ignores the -title
> and -name switches.
>
> Thanks
> Fletcher
>
If you're asking about sh/bash then this is what I have for my PS1
variable:
zamb ~ $ echo $PS1
\033]0;\u@\w\007\u \w $
This will put "user at working_dir" in the title bar and "user working_dir
$ " in the prompt.
To tell xterm to change the title bar you must issue '\033]0;' then put
what you want to appear in the title then close it with '\007.
Here is an example: if you want to change your title bar to "Hi World!"
run the following: echo -n -e '\033]0;Hi World!\007'.
Ziyad.
More information about the ubuntu-users
mailing list