LyX

Comment 22 for bug 1307619

Revision history for this message
Want Privacy (lundril-p) wrote :

It seems there is actually a simple fix for most of these problems.
As far as I can tell the root cause of the problem is as follows:

The appmenu-qt5 package somehow grabs all the menus from all applications and sends them via D-Bus to the window manager. Of course this will only work if the window manager is actually listening for these kind of messages on D-Bus.

The appmenu-qt5 plugin will only do this, if according to the documentation the environment variable QT_QPA_PLATFORMTHEME is set to appmenu-qt5.

Now installing the appmenu-qt5 package will put a script under "/etc/profile.d/appmenu-qt5.sh" and this script is a single liner:
  export QT_QPA_PLATFORMTHEME=appmenu-qt5

So the environment variable is UNCONDITIONALLY set. I think this is just plain wrong, since the assumption that ALL window managers will support this undocumented D-Bus menu forwarding mechanism is rather weird.
I think the script "/etc/profile.d/appmenu-qt5.sh" should check if Unity is running and ONLY THEN set the environment variable.
For example something like this:

  if [ "$DESKTOP_SESSION" = "ubuntu" ]; then
    export QT_QPA_PLATFORMTHEME=appmenu-qt5
  fi

Note: I am not an Ubuntu wizard, so I am not sure what the best way is how to check for Unity in a bash script. I at least think the above would work...