Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer 1

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;;
               *) :;;
esac

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
add comment

Your Answer

 
discard

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.