GNOME, the Linux desktop on top of which Ubuntu’s Unity desktop is built, has this neat feature which allows you to edit the keyboard accelerator associated with any application menu item, simply by opening the menu, hovering over the menu item, and typing the keyboard accelerator you want to use.
Unfortunately, the way Ubuntu implemented its global application menu, i.e., the feature which causes the menus for the currently focused application to appear in the bar at the top of the screen rather than the application’s title bar, prevents editing menu accelerators from working. This is true even when you’ve disabled the global application menu in your Unity settings.
Here’s how to get around this problem so you can edit the menu accelerators for an application (basic idea courtesy of Ask Ubuntu, with some tweaks from me).
First of all, enable accelerator editing at the GNOME level by running “dconf write /org/gnome/desktop/interface/can-change-accels true” in a terminal window. You only need to do this once; it’ll stay set forever once you set it.
Now, when you want to edit the accelerators for an application, launch it from a terminal window with “UBUNTU_MENUPROXY= ” in front of the command. The space at the end is important. For example, to edit GIMP’s accelerators: “UBUNTU_MENUPROXY= gimp“.
What this does is launch the application while disabling the shim that implements Ubuntu’s global application menu. With the shim disabled, accelerator editing works.