I've selected "Replace initial title" setting in gnome-terminal's preferences, but it just shows the default title "Terminal". After reading this answer, I added this to my .bashrc
:
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
and also commented out this line:
#PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
After restarting terminal, it started to show user@hostname: ~/currentdir
in its title, changing it whenever I cd
to another directory. But it still does not change when I launch CLI programs like cmus
and vim
(vim, for example, sets current filename as a title).
I've installed rxvt
and everything works fine there.
Ubuntu 13.04, gnome-terminal 3.6.1.
My .bashrc - almost the same as shipped with default ubuntu installation.