40

The new indicator-appmenu in Maverick breaks the LyX menu: the application menu is not shown either in the application window nor in the applet. (See Bug report.)

As a workaround while the bug is fixed, is there a way to make an exception for the applet, so that LyX would be ignored and the applet could still be used for everything else? Something akin to Maximus exceptions.

2
  • The current answers all don't work on Ubuntu 12.10. If someone could put a bounty on this I would be grateful. I put +100 bounty and got no response.
    – Flimm
    Jan 3, 2013 at 15:45
  • It works for me (on 12.10)- I know it is not much helpfull but might answer why nobody answered you as it might be something unique to your system. May try to report it as a bug.
    – sup
    Jan 19, 2013 at 13:24

5 Answers 5

40

Run an application

  • To start an application (eg., gcalctool) with the menu within the application rather than in the panel, run the following in a terminal:

    UBUNTU_MENUPROXY= gcalctool
    

    To start the application with the menu enabled in the application and the panel, run:

    APPMENU_DISPLAY_BOTH=1 gcalctool
    
  • Instead of using the terminal, you can use the Alt + F2 shortcut to start a run dialog, in which you would enter:

    env UBUNTU_MENUPROXY= gcalctool
    

    or

    env UBUNTU_DISPLAY_BOTH=1 gcalctool
    

Edit application launchers in Ubuntu 10.10

To make it easier to always launch your application with the same appmenu settings, you can edit application launchers in the menu, the gnome-panel, and on the desktop:

  • Gnome-panel and desktop: simply right-click the launcher, select "Properties" and prepend env UBUNTU_MENUPROXY= or env UBUNTU_DISPLAY_BOTH=1 to the value in the "Command" field:


    (source: xrmb2.net)

  • Menu: right-click the menu and select "Edit Menus". In the new window, find the launcher you want to edit and click the "Properties" button on the right. Again, simply prepend the variables like above (don't forget the 'env'), click on "Close" two times and you should be done.

Edit launchers in Compiz-based Unity in Ubuntu 11.04

  • Dirty method: Change the launcher's .desktop file in the /usr/share/applications directory:

    • For example, run

      gksudo gedit /usr/share/applications/gcalctool.desktop
      
    • Now edit the Exec=-line to contain either of the two variables from above, eg.:

      Exec=env UBUNTU_MENUPROXY= gcalctool
      
    • Save the file, and launching gcalctool from Unity's launcher bar should run it with the menu within the application.

    Disadvantages of this method: it will change the launcher for all users and will probably be reverted by system updates.

  • Better method:

    • If already added, unpin the launcher from the launcher bar.
    • Copy the related .desktop file to your home directory:

      cp /usr/share/applications/gcalctool.desktop ~/.local/share/applications
      
    • Like in the method above, edit the Exec=-line to contain either of the two variables:

      Exec=env UBUNTU_MENUPROXY= gcalctool
      
    • Make the file executable:

      chmod +x ~/.local/share/applications/gcalctools.desktop
      
    • Start Nautilus in that folder and double click the .desktop file (which should just read "Calculator" in the example):

      nautilus ~/.local/share/applications
      
    • Now you should see the launcher icon in the launcher bar - pin it via the quicklist and you are done.


Note: To make above work with KDE applications, replace UBUNTU_MENUPROXY= with QT_X11_NO_NATIVE_MENUBAR=1.

6
  • 2
    This works, thanks. I also learned that QT_X11_NO_NATIVE_MENUBAR=1 works.
    – topyli
    Oct 13, 2010 at 14:06
  • Interesting to note that you use ALT+F2 which isn't available in Natty with Unity, and we have no way to graphically maintain launcher items in Natty, so you have to use the dirty method :(
    – popey
    Jan 25, 2011 at 9:11
  • 1
    @popey: In compizconfig on my natty, the "Run command" for Ubuntu Unity Plugin has a default value of Alt-F2. Does that not work for you? If so, try disabling the shortcuts in Gnome Compatibility.
    – idbrii
    May 6, 2011 at 17:29
  • You can do "Edit Menus" in 11.04. Search for menu in the dash and select "Main Menu" or use Alt-F2 to run alacarte.
    – idbrii
    May 6, 2011 at 17:41
  • Does this method still work in Ubuntu 12.10?
    – Flimm
    Dec 7, 2012 at 16:19
4

Another work around which would not give you the double menus, would be to start LyX with:

UBUNTU_MENUPROXY= lyx

Unsetting the UBUNTU_MENUPROXY environment variable will just completely ignore the appmenu.

4

That should be:

#!/bin/sh
export APPMENU_DISPLAY_BOTH=1
exec lyx

To get rid of the lingering shell process.

1

I have created a shell script, named "lyx_unity", which executes APPMENU_DISPLAY_BOTH=1 before lyx, and edited the menu entry so that it executes "lyx_unity" instead of "lyx".

1
  • How the script looks like? I am not familiar. Could you please post it.
    – waluyo
    Nov 19, 2010 at 6:13
1

@waluylo, my (and probably Robert's too) lyx wrapper looks simply like this

#!/bin/sh
export APPMENU_DISPLAY_BOTH=1
lyx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .