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

可紊 提交于 2019-12-04 05:30:12

appmenu-gtk (which provides the global menu bar) specifically blacklisted emacs since it does not play nicely together so unfortunately you probably can't use it with emacs.

  1. Use your favorite editor to open this file: /usr/lib/gtk-2.0/2.10.0/menuproxies/libappmenu.so
  2. Find the word "emacs"
  3. Change "emacs" to other word
  4. Save the file
  5. sudo ldconfig

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

Cleaner way to circument the blacklist:

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

any name except "emacs" works.

You might need workaround for updating menus from http://code.google.com/p/gnome2-globalmenu/issues/detail?id=357#c8 (don't know if still relevant, or if that's the only problem):

(defun menuupdate () (menu-bar-mode -1) (menu-bar-mode 1)) 
(add-hook 'window-configuration-change-hook 'menuupdate)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!