Solved LibreOffice system theme and global menu broken after update

Modifiying the ~/.shrc file work if you are calling LibreOffice from command line.

$HOME/.config/plasma-workspace/env/path.sh
It doesn't work for me. I did it and resourced the file without logging out with . : . ~/.config/plasma-workspace/env/path.sh because If I log out I will loose my session because KDE's saving session doesn't work, so I try not to log out.
 
BTW, currently libreoffice is packaged without the GTK compatibility, so no themes are applied under my XFCE installation (and presumably under other GTK-based DEs).
 
BTW, currently libreoffice is packaged without the GTK compatibility, so no themes are applied under my XFCE installation (and presumably under other GTK-based DEs).
Replying to myself: I "fixed" this by installing misc/qt5ct, choosing the "Darker" color scheme and creating:

Code:
[13:54][fmc000@tu45b-freebsd][~]
 ╰─$ cat .xsessionrc
# Libreoffice
export SAL_USE_VCLPLUGIN=qt5
export QT_QPA_PLATFORMTHEME=qt5ct
[13:55][fmc000@tu45b-freebsd][~]
 ╰─$

Now libreoffice looks much more integrated with my desktop.
 
Thanks, I don't have a ~/.xinitrc in $HOME and I don't know if I should create one or just wait that LibreOffice get fixed by the maintainer.. ? Is it THE solution or just a temporary fix ? LibreOffice GUI worked before the new version without the need to put any environment variable in any file.
If you are not using .xinitrc, you must be using a display manager to login to your desktop. Please look for the appropriate method to set an environment variable under your display manager/DE.
I have no information on whether this issue will be addressed in libreoffice package or not. In the meantime, setting SAL_USE_VCLPLUGIN=qt5 seems to work alright.
 
I tried to put it in /usr/local/etc/sddm.conf in [General] and restarted sddm, but it doesn't work.
Since it seems that there is no possible permanent GUI "click and run" LibreOffice workaround for me, this will do for now: SAL_USE_VCLPLUGIN=qt5 /usr/local/bin/soffice &
Problem solved.
 
  • Like
Reactions: drr
I tried to put it in /usr/local/etc/sddm.conf in [General] and restarted sddm, but it doesn't work.
Since it seems that there is no possible permanent GUI workaround for me, this will do for now: SAL_USE_VCLPLUGIN=qt5 /usr/local/bin/soffice &
Problem solved.
Did you try what I wrote a couple of posts above yours?
 
I tried to put it in /usr/local/etc/sddm.conf in [General] and restarted sddm, but it doesn't work.
Since it seems that there is no possible permanent GUI workaround for me, this will do for now: SAL_USE_VCLPLUGIN=qt5 /usr/local/bin/soffice &
Problem solved.
I read somewhere that sddm may source startup scripts for shells. Have you tried setting this environment variable through ~/.xinitrc or ~/.profile?
 
In ~/.profile , yes, it did nothing; …

Previously,

… or ~/.profile?

1730060504904.pngI don't imagine using the Bourne Shell startup script for login shells (for this purpose).
 
  • Like
Reactions: drr
Yes I did. Somehow, it load when I click the OK button, and disappear when I closed and reopened the window, it doesn't stick; and when I start back LibreOffice nothing changed.
Well, this means the KDE is not respecting .xsessionrc and, unless I'm missing something, this is a bug on their side, I believe that every WM / DE should honor the contents of tht file.
 
Well, this means the KDE is not respecting
.xsessionrc
and, unless I'm missing something, this is a bug on their side, I believe that every WM / DE should honor the contents of tht file.
There is no such file in FreeBSD if I'm not mistaken, see that link. I finally did found an .xinitrc in /usr/local/etc/X11/xinit
 
There is no such file in FreeBSD if I'm not mistaken, see that link. I finally did found an .xinitrc in /usr/local/etc/X11/xinit
Well, every dotfile in the home directory must be created by the user so I don't understand what you mean with your sentence. The user create the .xsessionrc and the session manager should read it and honor its contents. That's the way Unix works in general AFAIK (or at least it used to, as it seems that KDE does not honor it - XFCE in FreeBSD definitely does).
 
I just tried plasma 6 and I can confirm that this is not an issue on plasma 6. It's related to the latest update of plasma 5. But since plasma 6 is not quite ready yet I booted back to plasma 5.
 
Well, every dotfile in the home directory must be created by the user so I don't understand what you mean with your sentence. The user create the .xsessionrc and the session manager should read it and honor its contents. That's the way Unix works in general AFAIK (or at least it used to, as it seems that KDE does not honor it - XFCE in FreeBSD definitely does).
~/.xsessionrc is executed on Debian (and derivatives such as Ubuntu, Linux Mint, etc.) by the X startup scripts on a GUI login, for all session types and (I think) from all display managers. It's also executed from startx if the user doesn't have a .xinitrc, because in that case startx falls back on the same session startup scripts that are used for GUI login. It's executed relatively early, after loading resources but before starting any program such as a key agent, a D-Bus daemon, etc. It typically sets variables that can be used by later startup scripts. It doesn't have any official documentation that I know of, you have to dig into the source to see what works.

.xinitrc and .xsession are historical features of the X11 Window system so they should be available and have a similar behavior on all Unix systems. On the other hand, .xsessionrc is a Debian feature and distributions that are not based on Debian don't have it unless they've implemented something similar.
In the link, that's why I was saying that this file doesn't seem to be necessary on FreeBSD, I could be wrong tough.
 
The issue has been resolved for me after updating to 'libreoffice-24.8.4.2' from the 'latest' repository; LibreOffice now uses the qt5 theme without having to set VCL plugin explicitly.
 
Back
Top