Search Unity

Bug Application menu not working

Discussion in 'Linux' started by hiphish, Sep 7, 2020.

  1. hiphish

    hiphish

    Joined:
    Nov 13, 2010
    Posts:
    626
    Hello,

    I am running Unity 2020.1.4f1 and 2019.4.9f1 from the UnityHub, and both editors have the same problem: almost all menu entries in the editor's application menu are greyed out. I mean the menu with the "File", "Edit" and so on at the top of the window. I am using Kubuntu 20.04 with the global menu widget. I have attached a screenshot, please excuse the crummy quality (I could not take a proper screenshot with the menu open).

    The individual menu entries can be accessed via their keyboard shortcuts, at least if they have any defined. But all the other ones are inaccessible.
     

    Attached Files:

  2. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    This is a known problem with KDE's global menu. Unity doesn't like it for some reason. The only workaround (as far as I know) is not to use the global menu.
     
  3. hiphish

    hiphish

    Joined:
    Nov 13, 2010
    Posts:
    626
    Is there a way of disabling the global menu for Unity only? The global menu is important to me for ergonomical reasons, it really helps me. I could stomach turning it off for a couple applications, but not for all of them.
     
  4. hiphish

    hiphish

    Joined:
    Nov 13, 2010
    Posts:
    626
    To partially answer my question, setting the KDE_NO_GLOBAL_MENU environment variable does suppress the global menu. Now the question is, how do I pass this environment variable to Unity only? I can pass it to the Unity Hub application, but that won't propagate it to the Unity process itself.
     
  5. hiphish

    hiphish

    Joined:
    Nov 13, 2010
    Posts:
    626
    I have had a first success in suppressing the global menu. As it turns out, the above environment variable is for Qt applications only, but Unity uses GTK. I have the appmenu-gtk package installed, so I needed to go to ~/.config/gtk-3.0/settings.ini and remove the line that says
    Code (csharp):
    1. gtk-modules=appmenu-gtk-module
    This is still sub-optimal, because I have to do and undo this change every time I launch Unity. I need to find a way of forcing this change per application.
     
  6. MadWatch

    MadWatch

    Joined:
    May 26, 2016
    Posts:
    112
    I remember somebody mentioned a KDE config file where you can disable the global menu per application basis. Search this forum and you should find it.
     
  7. hiphish

    hiphish

    Joined:
    Nov 13, 2010
    Posts:
    626
  8. Corodius

    Corodius

    Joined:
    Dec 14, 2014
    Posts:
    15
    Ok, so 2 ways you can get around this on a per-application basis.

    1. is to set "env UBUNTU_MENYPROXY=0" before the command in the .desktop/launcher for UnityHub, so it would read eg.
    "env UBUNTU_MENUPROXY=0 /home/<username>/Applications/UnityHub.appimage"
    (or relevant path)
    You can do this by right clicking the menu button, "Edit Applications", then find the Unity Hub entry and edit this.

    this has downsides of sometimes messing up upgrades though. The better alternative would be
    2. install dconf editor, and blacklist Unity.

    Install dconf editor with "sudo apt install dconf-editor" in the terminal. Then run this, navigate to:
    "org/appmenu/gtk-module/blacklist"
    Click the edit button, turn off "Use default value" and in the "Custom Value" box, add " 'Unity' " after the end, eg after adding to the default on my install:
    "['anjuta', 'freeciv', 'freeciv-gtk2', 'freeciv-gtk3', 'glade', 'gwyddion', 'Unity']"

    Ensure you completely quit Unity and Unity Hub, then run again and Unity will be blacklisted from the appmenu. Hope it helps!
     
    Gentlenyan and kittipatv like this.