GTK Global Menu in Plasma 5.13

UPDATE:
Old, original message is below with strike through format. Here I add the info how to enable global menus on Plasma 5.13+. I assume here that you already know how to enable global menus in Plasma (system global menus panel applet or Active Window Control necessarily git version, global menus on titlebar).

  • update to Plasma 5.13 or higher
  • install appmenu-gtk-module
  • install libdbusmenu-glib for electron global menus
  • check also if you have those packages, if not, install them:
    appmenu-qt4 (support for qt4 apps, if you don't use them, you don't need it)
    lib32-libdbusmenu-glib
    lib32-libdbusmenu-gtk2
    lib32-libdbusmenu-gtk3
    lib32-libdbusmenu-qt
    libdbusmenu-glib
    libdbusmenu-gtk2
    libdbusmenu-gtk3
    libdbusmenu-qt4
    libdbusmenu-qt5
  • Libre Office since 6.2 has native support for Plasma global menus. For older LO versions you need to enable it (although is now a bit buggy - see info at the end) by adding to ~/.xprofile a line:

export SAL_USE_VCLPLUGIN=gtk

if ~/.xprofile doesn't already exist, create it and add this line.

then reboot system.

The section below is valid only for Arch based systems! Distros based on Ubuntu don't have to do it as Thunderbird and Firefox there is already with Unity patches for global menus.

  • for Firefox global menus install from AUR firefox-kde-opensuse-bin (already compiled version, unpacked from deb) or compile yourself from AUR firefox-kde-opensuse (will take a long time, even 2 hours or more!)
  • for Thunderbird global menus compile from AUR thunderbird-appmenu (compilation can take 1 hour or more), make temp folder should be set on root to avoid longer paths, which can break compilation (issue with Thunderbird's compilation)

Warning: At the moment of writing Firefox's and Thunderbird's global menus work correctly with system global menu applet/widget and with titlebar. When you use AWC applet this is currently bugged and menus show up but don't respond to click. As a temporal workaround: click on the first menu item, move the cursor through menus, click on the FF or TB window anywhere to unfocus menus, switch to other window and then back to FF or TB. Menus will then work until program restart. Hopefully, this will be later fixed.

Just a news:

http://blog.broulik.de/2018/03/gtk-global-menu

I hope that Manjaro will be ready for adding needed packages to its repo so when we update to Plasma 5.13 it will support GTK global menus.
At this moment it can be tested by installing those two packages:

appmenu-gtk-module (Manjaro repo)
gmenu-dbusmenu-proxy (currently in AUR, later should be in Manjaro repo)

For Libre Office menu add to ~/.xprofile a line:

export SAL_USE_VCLPLUGIN=gtk

Reboot.

I tested it on my Manjaro install and it works very well. Inkscape, Gimp and many other GTK applications and also Libre have working global menu now!

There are some bugs in LO menus and hopefully, they will be fixed in LO 6.1 or 6.2 version.

Firefox and Thunderbird gobal menus are not working now but they are planned so we have to be patient, they will come eventually.

Also remember, when some programs launch as root (like GParted or Grub Customizer), they won't have global menus because they use root profile, not a user one. This will be changed with time anyway and programs will be launched by a user and only actions as root (a requirement for Wayland) so global menus will work then.

10 Likes

'LLo,

Vade retro sathanas GeTeKas !
But what does the Plasma Inquisition do?
I’m just obviously kidding…!

LibreOffice-Fresh has native KDE support now.

4 Likes

How to enable it, Philm?

Yes, how to enable it? I installed libre-fresh and it doesn’t have global menus, nor titlebar menus so it looks like it’s not working out of the box and some action is needed.

Seems it will be enabled with v6.1 series …

1 Like

Do you mean, it (LO) will itself detect the environment (Gnome or KDE) and modify itself? I doubt it. I suppose, we’ve to adjust /etc/environment or /usr/profile.d/libreoffice-fresh.sh
Problem is, exact modification is not clear! :zipper_mouth_face:

I see nothing about that in release notes:
https://wiki.documentfoundation.org/ReleaseNotes/6.1

@philm where did you get info about native KDE support? There was some info in 2016 about native gtk menus but I can’t find anything about KDE. Is there a chance you mixed it with that gtk old news?

Have a look here:
https://www.phoronix.com/scan.php?page=news_item&px=LibreOffice-KDE5-Backend

1 Like

Thanks, @bogdancovaciu. It looks like the official release is planned for August 6th-12th, 2018 so that’s still a lot of time :frowning:

https://wiki.documentfoundation.org/ReleasePlan/6.1

It would be easier to use the info about libreoffice-gtk3 package but… it seems not to exist on Arch. There is a Debian package:

https://packages.debian.org/pl/sid/libreoffice-gtk3

I see nothing in AUR.

1 Like

Is a bit confusing for me right now, because after some tests and reboots (on a test machine) inkscape doesn’t show the menu anymore (nor mypaint, nor gimp), but on another install it works … buahahaha
I think most of the sources are from OpenSuse (i might be wrong on that).

In the article it was written:

For Gimp, Inkscape, and others you need to install appmenu-gtk-module and export GTK_MODULES=appmenu-gtk-module

I didn’t do any “export” (and I don’t know how to do it anyway), reboot was enough for me and menus to work but maybe you need to set it that way.

Here is how it looks for me:

3 Likes

Just a question: what’s the fun of having a window in the middle of the screen and the menu for the program completely at the top of the screen? You will only make longer movements with the mouse.
Plus what happens when you have more than 1 program open in smaller windows, all together on the screen. Will the menu on top change every time another program gets focus?
Looks to me I will not be using this feature soon.

1 Like

Is not quite suitable for us my friend. Not for big screens on dual displays, but is perfect for smaller screens and single display because all the menus are in one place, following the same pattern, and that is ok for eyes and movement. On my main tower i can’t use this, is impractical for my workflow.

LOL, that’s more for the sake of screen. However, I can still use titlebar menu and panel menu in maximized state. But let’s assume my window is not maximized, since my focus follows the mouse/cursor I have to either move it quickly or use titlebar menu if my window is not maximized and other windows are behind. I got use to it and that’s not a problem.
Global menus simply save screen space:

Besides, menus are not often used so it’s no problem having them in the panel. I can also do this:

Also, global menus look cool and give the feeling that programs and the environment are tied closely so everything is smooth and mature.

4 Likes

Same deal as MacOS (that is why i don’t use it anymore) … actually in linux is way more coherent and usable.

now sublime is even better

The ideal was in Unity where menus could show up in panel or titlebar, whenever we wanted them and whenever it was more convenient for us. Plasma is closing to that.

1 Like

It’s more to use in small screens, like many said, but it’s also ok to use in bigger screens if you rarely uses the menu.

I use the same computer on small and big screens, and since I’m so used with my keyboard shortcuts, even on bigger screens the usage is so minimal that the very few times that I have to use it, it end up not being a struggle at all

(Not very sure about this) I think the global menu does not work out of the box with LibreOffice, but it works after doing the “export”. libreoffice-fresh is what you need, and I don’t think we have the libreoffice-gtk3 package.

What Kai meant by “export” in his blog is to add the export ... line in your ~/.xprofile. For example, these are the export lines from my own .xprofile:

export OOO_FORCE_DESKTOP="gnome" # this has nothing to do with global menu, but to make LO works with fctix
export SAL_USE_VCLPLUGIN=gtk
export GTK_MODULES=appmenu-gtk-module

There’re still some glitches though. When LO Writer is started on its own, the first item (“File”) is not clickable for me. But it works when you launch LO first and open writer from there. To workaround this, I edited my menu and put a dummy item before the “File” item.

Screenshot of LibreOffice Writer with global menu (“LO” is the dummy item lol)

2 Likes

Forum kindly sponsored by Bytemark