2

This is a question strictly out of curiosity.

Since Unity was 'discontinued' there has been very little globals menu's around. I know KDE has one that does not always work, and Ubuntu Unity say they have some issues with Thunderbird which stopped support because it was difficult (supposedly).

Why is that exactly? I have never found any actual articles on the topic.

I read something online somewhere (at some time :p) that gnome programmers thought the code was ugly.

Is it not done because there is little agreement on how it should be done? Or is it just a general disinterest to have a global menu.

Really just curious :)

6
  • I mean that KDE's global menu does not work with all software. For example firefox, without patching it. Here is an article from ubuntuunity.org - ubuntuunity.org/2020/06/27/global-menu-on-thunderbird
    – Eirik
    Nov 17, 2020 at 16:56
  • I just don'r understand why it would be more difficult to make a global menu, than a normal menu.
    – Eirik
    Nov 17, 2020 at 16:58
  • 2
    Your question is really too broad for AskUbuntu. You should only ask practical, answerable questions based on actual problems that you face.. Every application is different. My guess is that translating every single application menu for every single application and all of the versions of that application to every single desktop environment and every single version and update for that desktop environment is a waste of time. Firefox doesn't even show menu by default and hasn't for a long time now. That's one example of millions of combinations.
    – Nmath
    Nov 17, 2020 at 17:38
  • 1
    This question would be better suited on a forum (ubuntuforums.org) as it's very opinion based, and thus off-topic as @Nmath has stated. KDE apps should work for apps that use Qt calls/libraries (your first comment), however users run apps intended for other environments (GTK etc)....
    – guiverc
    Nov 17, 2020 at 21:40
  • Thank you for replies, big ups. I will move over to the forums I suppose. :) Thanks
    – Eirik
    Nov 19, 2020 at 13:14

1 Answer 1

3

The global menu in linux is a menu that is exported (share the menu estructure with other applications) from an especifc aplication internal logic, to then be consumed (undrestand and display) by an external application, like can be a linux desktop. So, the point to be underestand here is that it's a task of the specific app (the specific developers of this app) export the menu and if this task is not done in a good way, there is no way to display the menu externally as a global menu in the desktop then.

Please, understand that an application developer and a desktop developer are different people and probably are not in contact at all. If you think that mantain a global menu is a task of a desktop developer, i need to said that is not that way really. The task of a desktop developer is only display the menus that have been previously exported by the app developers. Export the menu is then a task of the application developer instead and like there are a lot of applicaction, there are then a lot of developers with a diference preferences that can decide or not export his menus.

To create a desktop application with the ability to export a menu, you need in first place a menu to be exported in that app. Also the menu need to be a commond menu, because the export action requiered that the menu estructure can be serialize (converted to a "text" that can described in an standard way the menu estructure). In general, all this task of export the existing menu, is a task of the developer of that specific application (for example firefox). So, the developer of the app can decide not have a menu to be exported, not export the menu, not follow conventions in the menu estructure (which means that can not be serialized), not have a menu at all to be exported and more ...

To sum up currently few developer, has decided to export their menu. Many even decide not to have menus or to make them in such a way that they cannot be serialized. So, the action of export the menu is not something that occurs by default and then here is where is the problem.

In some point, the ubuntu developers realized that the specific app developers normally do not want to export his menus by themselves for most of apps they produced. This is a big problem, because without that action there are not any global menu to show. Nevertheless, in that moment most of linux applications was following several conventions, for example, the concept of a menubar was an standard feature and then was be possible hack the apps and detect where the menubar was and then try to parse it and forced it to be exported as a global menu. This is exactly the reason of why the gnome developers don't want the implementation of the global menu of the ubuntu developers, because really is a hack what they do.

Nevertheless, can not be done the same hack in all app, because the apps are not really equals internally. Only the apps that are make with the same toolkit (Gtk, Qt, Java Swing...) are really candidates to be hacked. Then the ubuntu developers created a hack for Gtk2 apps, another for the Gtk3 apps, another for the Qt apps and others external developers created one for Java Swing. But not all apps are make by and standard toolkit way, so, some apps can decide override how his menus works and in that case will be not possible export a non standard menu. For example the mozilla products does not use the standard gtk toolkit, instead they modify the toolkit, and then his menus can not be exported in the same way.

To complicate even more the things, the GNOME developers decided do not use anymore menubars in his applications and promote that idea to be implemented by all Gtk developers. That ofcourse is a direction against of what is needed to have a global menu and therefore is making the things much more complicated besides that now Gtk4 is released and there are not a hack for now for this version of the toolkit. Also the GNOME developers decided remove the feature that was used by the ubuntu developers to create his gtk hack, so now is needed another mechanims to hack the Gtk4 apps.

Much more complicate is that all apps are constantly changing his internally implementation, so one application that is working today can not be workinng the next day. The same occurs with the toolkit (remember that the hack depend of the toolkit), as the toolkit is constantly changing.

So, mantain a global menu involve mantain a hack for a lot of app and toolkits at same time. I think that i don' t need to explain how complicate is hack somenting and how complicate is make a hack of something that can change constantly. It's like make only one vacine efective for several virus that are mutating constantly.

1
  • Thanks for an incredibly thorough answer! I really appreciate you taking the time, I have been wondering this for a long time and you made it very understandable :) Have an amazing day, you made mine :)
    – Eirik
    Oct 10, 2021 at 15:54

You must log in to answer this question.

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