开发者

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

开发者 https://www.devze.com 2023-04-06 21:26 出处:网络
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 spa

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 globa开发者_StackOverflowl menu bar? Your help will be much appreciated. Thank you.


  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.


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.


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)
0

精彩评论

暂无评论...
验证码 换一张
取 消