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

孤人 提交于 2019-12-09 17:44:28

问题


I use latest Ubuntu 11.04 which has Unity desktop. I am learning to use Emacs 23.

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

How to enable global menu bar? Your help will be much appreciated. Thank you.


回答1:


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.




回答2:


  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.




回答3:


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)


来源:https://stackoverflow.com/questions/7497440/how-to-enable-global-menu-bar-for-emacs-on-ubuntu-unity-11-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!