If you're subscribed to the Ayatana mailing list (or you can look here - look for "Menus hidden by default"), you probably know the huge discussion behind the AppMenu (Global Menu) which is set to autohide by default in Ubuntu 11.04 (in both Unity and the classic desktop). Apparently even quite a few Ubuntu developers find it confusing.
I didn't find a way to disable the autohide only, but I was reading on Ubuntusecrets.it about disabling the AppMenu altogether and though I'd let you know about 2 ways of disabling the AppMenu: either for a specific application or globally, for all applications but using a different method which should keep you error-free.
Please note that on the "Ubuntu classic" desktop (that's the name of the session in the login window for the classic Gnome desktop in Ubuntu 11.04 - without Unity), you can simply right click the panel, deselect "Lock the panel", then right click the AppMenu and remove it. The menu will then instantly be available in the application window.
But for Unity, it's a bit more complicated. Read on!
Disable the AppMenu (Global Menu) in Ubuntu for an individual application
If you want to run an application with the menu inside the application window and not on the Uniy panel (which is not a regular Gnome Panel!), use the following command (just an example):
UBUNTU_MENUPROXY=0 gedit
No, that's not an error, you basically must run "UBUNTU_MENUPROXY" with an empty value.
You can also run an application with the menu in both the Unity panel and the application window, like so:
APPMENU_DISPLAY_BOTH=1 gedit
You can edit the .desktop file if you want to make some menu item always open a certain application without AppMenu (you can find them in /ur/share/applications).
Disable the AppMenu Indicator in Ubuntu (Unity) for all applications
If you want to disable the Appmenu (Global Menu) for all the applications in Unity, run the following commands:
sudo su
echo "export UBUNTU_MENUPROXY=0" > /etc/X11/Xsession.d/81ubuntumenuproxy
Then restart your computer.
You can also remove the AppMenu (but this might also remove the ubuntu-desktop meta package) if the above tweak doesn't work:
- for Ubuntu 11.04 and 11.10:
sudo apt-get remove appmenu-gtk indicator-applet-appmenu indicator-appmenu
- for Ubuntu 12.04, 10.10 and 13.04:
sudo apt-get remove appmenu-gtk appmenu-gtk3 appmenu-qt indicator-appmenu
If you want to re-enable the AppMenu, simply remove the /etc/X11/Xsession.d/81ubuntumenuproxy file:
sudo rm /etc/X11/Xsession.d/81ubuntumenuproxy
Or, if you've removed it, install it back:
- for Ubuntu 11.04 and 11.10:
sudo apt-get install appmenu-gtk indicator-applet-appmenu indicator-appmenu
-for Ubuntu 12.04, 12.10 and 13.04:
sudo apt-get install appmenu-gtk appmenu-gtk3 appmenu-qt indicator-appmenu
Considering the discussion on the Ayatana mailing list, who knows, maybe the AppMenu will get an option to disable the autohide or some other changes - everything is possible since Ubuntu 11.04 is still alpha.