How to enable global menu bar for Emacs on Ubuntu (Unity 11.04)

I am using the latest Ubuntu 11.04, which has a Unity desktop. I am learning to use Emacs 23.

As you know, Unity has a top bar. I want to enable the global menu bar for Emacs to save valuable screen space. (I use a small screen laptop)

How to enable the global menu bar? Your help would be greatly appreciated. Thanks.

+6
source share
3 answers

appmenu-gtk (which provides a global menu bar) is an emacs blacklist because it does not play well together , unfortunately you probably cannot use it with emacs.

+7
source
  • Use your favorite editor to open this file: /usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so
  • Find the word "emacs"
  • Change "emacs" to another word
  • Save file
  • sudo ldconfig

update: the file "libappmenu.so" has been moved to "/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/menuproxies" now in ubuntu 12.04.

+8
source

A cleaner way to bypass the blacklist:

 ln -s /usr/bin/emacs somewhere_on_PATH/emacs-with-global-menu 

any name other than "emacs" works.

You might need a workaround to update the menu from http://code.google.com/p/gnome2-globalmenu/issues/detail?id=357#c8 (I don’t know if it’s still relevant or if this is the only problem):

 (defun menuupdate () (menu-bar-mode -1) (menu-bar-mode 1)) (add-hook 'window-configuration-change-hook 'menuupdate) 
+2
source

Source: https://habr.com/ru/post/897739/


All Articles