Gvim does not have a global menu (appmenu / application menu) in 12.04, and when starting gvim from a terminal, the following warning appears in the terminal after 25 seconds:

** (gvim:20320): WARNING **: Unable to create Ubuntu Menu Proxy: Timeout was reached

How to fix this?


5 Answers 5


Solution 1: Make the global menu for gvim work

To get global menu for gvim and to get rid of the warning message, add this to ~/.bashrc and restart the terminal:

function gvim () { (/usr/bin/gvim -f "$@" &) }

Solution 2: Disable global menu for gvim

To just get rid of the warning message, you can disable the global menu, at least for gvim:

For example, add this to ~/.bashrc and restart the terminal:

alias gvim='UBUNTU_MENUPROXY= gvim'


  • why the quotes around the 'all arguments'?
    – xtofl
    Dec 7, 2012 at 19:42
  • sorry. I wondered why there are quotes around "$@" in the .bashrc function.
    – xtofl
    Dec 7, 2012 at 20:49
  • @xtofl: Without the quotes around "$@" you get trouble with e.g. space and literal '*' in arguments. Dec 8, 2012 at 0:25
  • Out of interest, could you explain how and why the first solution works?
    – ecatmur
    Dec 17, 2013 at 11:13
  • 1
    @ecatmur: This is how solution 1 works: The bug is related to gvim's way of going into background mode. gvim -f keeps gvim in the foreground. To make the shell run gvim in the background we add an &. The parenthesis in (foo &) runs the command in a subshell, so that gvim does not become a background process of the current shell. Without parenthesis, closing the terminal by clicking the X would also kill gvim. function foo () { ... } creates a shell function. We must add /usr/bin/ to gvim, otherwise we will get an infinitely recursive function. "$@" passes all arguments. Dec 19, 2013 at 10:20

There is a workaround here: https://bugs.launchpad.net/ubuntu/+source/vim/+bug/776499

Create an alias at the top of your shell init file (e.g. ~/.bashrc):

alias gvim="UBUNTU_MENUPROXY=0 gvim"

My Ubuntu 12.04 amd64 can work with gvim -f.

  • vim-gnome: 2:7.3.429-2ubuntu2.1+aptbuild1
  • terminator: 0.96-0ubuntu1+aptbuild1
  • guake: 0.4.2-7+aptbuild1

I can add the -f(--nofork) option when start gvim:

alias gvim="gvim -f"

This only works for gvim.
firefox and others don't have this -f option.


Another potential cause might be the ~/.gnome2/Vim file. This solution (which suggests that you delete ~/.gnome2/Vim) for the issue in Hardy Heron (before Unity) fixed the issue for me on Ubuntu 13.10.

For whatever reason, gvim -f didn't work for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .