Is it possible to make indicator-appmenu ignore a specific application?

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.


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.


That should be:

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

To get rid of the lingering shell process.