Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I use vim to edit some file, I have the set title command in my .vimrc. So it changes the title of the terminal.

But this changed/new title is not reflected on taskbar.

Is there any way to do that?

I am using Ubuntu 10.10.

share|improve this question
What desktop environment are you using? Are you using gnome-terminal as the tag suggests? – user76204 Nov 7 '13 at 23:57

When you mention 'taskbar' I assume you are running Gnome fallback or such like and you have some kind of panel with minimised application windows. I run Xfce with a traditional bottom panel. I have set title in my .vimrc and can say that the terminal title change is reflected on the 'taskbar', or rather the bottom panel, as the screenshot below shows:

enter image description here

The gnome-terminal tab is the fourth window on the panel showing Vim open with a script of mine called General_Backup.

It is difficult to say why the terminal's title is failing to be reflected on your 'taskbar' (panel), but I should check your ~/.bashrc and/or ~/.bash_aliases and see if there are any problems with your PS1 or PROMPT_COMMAND settings, and see if the prompt is being reset properly.

All I can say is that I use a special PROMPT_COMMAND in my .bashrc, which I have adapted somewhat from the commented out one in /etc/bash.bashrc:

case "$TERM" in
    xterm*|rxvt*) PROMPT_COMMAND='printf "%b" "\033]0;${PWD/$HOME/~}\007"'
                  export PROMPT_COMMAND;;
               *) :;;

I have found that using this PROMPT_COMMAND also allows you to have individual titles in your terminal tabs (denoting the current working directory), if you use, for example, gnome-terminal, or guake:

enter image description here

Using this PROMPT_COMMAND setting allows the vim window to revert to the present working directory when vim is exited; without it, Thanks for flying Vim remains all the time until the terminal is exited.

These tips should help you sort out the issue, but it may be a problem specific to your setup. If so, some further information might be necessary relating to the settings of your various programs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.