bash: __vte_prompt_command: command not found

pradeepcep picture pradeepcep · Mar 9, 2014 · Viewed 13.5k times · Source
bash: __vte_prompt_command: command not found

Whenever I open a terminal, I am greeted with this line. Also, this is printed each time I enter a command in the terminal.

I am a linux-noob, and would be happy to read up, if someone can point me to some resource, or hint at a possible solution. I tried google-ing, but was unable to turn up with any useful results.

I did not do anything specific just before this started popping up.

Thanks in advance :)

Additional Info:

  • The terminal I used is the default gnome-terminal

  • Fedora 20

Answer

carl.anderson picture carl.anderson · Aug 18, 2014

It sounds like a program named VTE has set your bash environment variable PROMPT_COMMAND to invoke a function called __vte_prompt_command.

The PROMPT_COMMAND environment variable defines a command that is executed before every new prompt is displayed to the screen. It can be very annoying when this command produces unexpected output.

You can temporarily get rid of the annoying messages by entering this command in the terminal:

__vte_prompt_command() { true; }

This creates a dummy function that does nothing - you can confirm by looking at the output of this command:

type __vte_prompt_command

After applying the hack to my system I see this:

__vte_prompt_command is a function
__vte_prompt_command ()
{
    true
}

However, this is an indication that VTE may not be installed properly and/or may be broken. You might want to try to reinstall VTE, if possible. I would not recommend putting this permanently into your ~/.bashrc file.