To start the application with the menu enabled in the application and the panel, the following command has to be used:
I recently discovered that this only works for non-gtk3 applications in Ubuntu 12.04 LTS, i.e. if you replace appname with applications such as gnome-terminal, gedit, evince, empathy, evolution, rhythmbox, nautilus, etc. only global menus will be displayed. However, if you start, for example, gimp or inkscape by using APPMENU_DISPLAY_BOTH, both global and local menus will be shown.
The questions is: why is APPMENU_DISPLAY_BOTH not taken into account when starting such gnome applications?
P.S. I know how to disable global menus in order to get the local ones (UBUNTU_MENUPROXY trick, removing appmenu-gtk/qt packages, removing the indicator-appmenu, etc.)
Thanks for the help!