[Techtalk] Changing the titlebar on an xterm

John Clarke johnc+linuxchix at kirriwa.net
Fri May 2 00:16:36 UTC 2014


On Thu, May 01, 2014 at 03:43:35PM -0600, Akkana Peck wrote:

Hi Akkana,

> Does anybody (besides me) still use xterm?

Sometimes, yes, although I mostly use gnome-terminal these days, and I
use set PROMPT_COMMAND in .bashrc to include the current directory in
the window title:

    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'

>   echo -e "\033]2; $* \007"

I use 'echo -ne "\033]0;$@\007"', but your version works too, as does
"xtermset -T" and "xtermcontrol --title".  I'm running xterm-278-1ubuntu3
on Mint 16.  The same commands work in gnome-terminal too.

> Anybody know a way to change an xterm's titlebar that works now,
> not ten years ago? Or the reason it stopped working?

I don't use xterm all that often now, but I've never noticed it not
working.  That doesn't mean it hasn't been broken at some time, just
that I haven't been observant enough to notice if it has :-p


- John

-- 
Object-[dis]oriented INTERCAL.  I have seen the compiler, and it runs.
Why do I now feel like the hero in one of those H. P. Lovecraft stories
who has seen something no mortal man was ever meant to see, and who is
marginally less sane thereafter?              -- Charlie Stross


More information about the Techtalk mailing list