May 05, 2012

How to automatically disable the global menu in gnome-shell session



The desktop of gnome-3 is not usable by default, this means right clicking on the desktop do not bring you a menu and you can't see any desktop icon. Although Ubuntu 11.10 (Oneiric) uses the gnome-3 libraries, it modify the settings so that you can right click on the desktop in Unity session. But if you install the gnome-shell in your unity desktop, the settings persists and you can right click also on gnome-shell session.

But the problem is unity uses a global-menu, which does also appear on the bottom of your gnome-shell top-panel. The default gnome-shell theme is dark enough, so it is not a very big problem. But if you change the gnome-shell theme to a lighter, you see the global-menu under the top-panel, which is not very nice. It becomes very bad when you have cinnamon installed or a custom-session with cairo-dock and/or Avant(AWN).

You can solve this problem by disabling the option of 'Have file manager handle the desktop' in gnome-tweak-tool or ubuntu-tweak. But you also lose the option of using the desktop. So, this is not a decent solution.

The solution:
  1. go to /etc/X11/Xsession.d and open 80_appmenu and 80appmenu-gtk3 with your favorite editor with administrative power.
  2. Comment out all the lines by placing a '#' mark, in front of the them in both the files.
  3. Save and close 80_appmenu file.
  4. Now add these lines at the bottom of 80_appmenu-gtk3 file:
if [ "x$DESKTOP_SESSION" = "xubuntu" ];
then
export UBUNTU_MENUPROXY="libappmenu.so"
fi
  1. Now save and close 80_appmenu-gtk3 file.
  2. Logout and Login again with gnome session or cinnamon or cairo-dock session.

Now you see that the global-menu is disappeared and you can also use the destkop.

1 comment: