Missing menu bar when LO launched from root

 Fedora Linux 31 kernel 5.4.17
 Dektop KDE

Trying to install an extension for all users: Tools>Extension manager does not offer the option to install for all users, therefore extension is only installed for current user.

According to the wiki, “if user has administrative rights”, possibility is offered to install for all users. My login has potentially administrative rights because it is a member of the wheel group, but LO does not launch the usual Linux dialog allowing to authenticate either as a wheel member or root user. Then I never go administrative.

As a tentative workaround, I su'ed to switch to root and soffice'd. LO launched in the start center. I clicked on “Writer new document” (unimportant, the same happens with any component). An empty document opened but the menu bar is missing!

If I do the same from an ordinary user, the menu bar is present.

A few answers on this site suggested to disable OpenGL. I unchecked hardware installation from Tools>Options, LibreOffice>View in my ordinary session (but don’t know if this is a user-only or system-wide configuration). I also disable OpenGL in the global system configuration.

Still no menu bar.

I also tried soffice --safe-mode -writer to no avail.

What can I do?

Basically, I want to install an extension system-wide. I don’t care for menu or not under root since I don’t intend to use LibreOffice under root.

I cannot confirm that menu bar is missing on start using root (regardless of using su-, sudo su - or sudo libreoffice6.{3|4} on my Fedora 31, Plasma(KDE) test system (using TDF packages). Have you got findings when calling dnf check?

Forgot to mention, I’m under “Enforcing” SELinux mode with more stringent user rules added. Switched to “Permissive” without change. I also erased /root/.config/libreoffice/ without effect.

LO is as per distro package. Machine has been recently completely reformatted and progressively reconfigured and reloaded. I may have broken something in the process.

The point is not about using LO under root but installing an extension system-wide. For that I need access to the menus. The obvious workaround is to install the extension in every user but I want to avoid this burden.

@anon73440385: dnf check returns nothing. Usually dnf does its job pretty well.

My last addition seems to get lost: There is one important difference on my test system. When I do su - and start libreoffice6.3 the VCL plugin algorithm yields gtk3. Since my test system is fully configured for use with GNOME as well, this doesn’t cause a problem on my system but may cause a problem on yours. So you may be it is worth to give an export SAL_USE_VCLPLUGIN=kde5; libreoffice6.3 a try to enforce Plasma/KDE VCL selection.

(Installed LibreOffice from distro repository and got no change on my test system.)

Does not change anything. “About LO” reports UI render: default; VCL:gtk3. I don’t think SAL_… makes a difference. I haven’t reinstalled GNOME because I thought it caused conflicts with the login manager (having both GNOME and KDE for sessions dedicated to one or the other desktop). Problems of bad login manager reinitialisation still present, forcing to reboot from time to time. I finally reloaded some GTK-only apps (such as GnuCash), so the GTK library is also there.as per dependency.

Your answer makes clear why export SAL_USE_VCLPLUGIN=kde5 doesn’t make a difference, if you haven’t had installed libreoffice-kde5 at all. To revert to x11 it wouldn’t have been required to remove libreoffice-gtk3 but export SAL_USE_VCLPLUGIN=gen would have been sufficient.

Since I don’t install GNOME and variants, I don’t understand why dnf has not installed the “correct” manager adapted to my desktop. It maybe a weakness or bug in Fedora packaging (I know that GNOME is the default desktop if you don’t force another one; this may explain that). This means also that libreoffice-gtk3 brought in all the GTK libraries and most of GNOME/MATE’s dependencies.

A more general question on AskUbuntu suggested the existence of a bug in Unity desktop.

Though I have no Unity, GNOME or MATE on my machine, some libraries could have been installed to satisfy dependencies, I removed package libreoffice-gtk3. LO reverted to X11 and the menubar reappeared.

Strangely enough, package libreoffice-kde5 was not installed. Installing it also cures the issue. Maybe my twisted configuration is the cause of it: GTK-only applications installed without GNOME, only the needed libraries brought by the dependencies.