Not sure if this is a bug or if I did something wrong
I have tried both libreoffice-qt and libreoffice-qt-fresh. Installed using configuration.nix
environment.systemPackages = with pkgs; [
libreoffice-qt
];
I previously had it installed on the 23.11 channel but switched over to unstable and it was replaced by the GTK version (it has GTK styling and the menubar doesn’t work in KDE Plasma), even though it seems like both channels should be using the same package for the “fresh” version.
UPDATE: I installed libreoffice-qt from the stable channel and it also seemed to be the GTK version, so I’m not sure if this is a Plasma 6 issue or if the package has been updated recently in both channels or again if I am doing something wrong. Here’s how I installed it from the 23.11 channel.
$ sudo nix-channel --add nixos-23.11 release nixos-23.11.7122.9ddcaffecdf0 nixos-stable
$ sudo nix-channel --update
Then in configuration.nix:
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
stable = import {
config = config.nixpkgs.config;
};
};
};
environment.systemPackages = with pkgs; [
stable.libreoffice-qt
];
Hmm interesting. This line seems suspicious to me:
In conjunction with a possible change in upstream’s ./configure
behavior, this may be the issue. It will be a big investment, but I’d try to change that line to --disable-gtk3-kde5
, and rebuild (it will take a few hours).
Thanks! How do I do that? (or what can i google to find out how?)
I don’t run KDE so I’m only guessing, but could this be related to:
opened 03:30PM - 11 Mar 24 UTC
0.kind: bug
6.topic: qt/kde
### Describe the bug
With the release of KDE Plasma 6, `libreoffice-qt` no long… er uses the Breeze theme from KDE but instead defaults to the default QT theme (which doesn't match up with the system at all and results in a really bad color clash when using dark themes). As I found [here](https://www.reddit.com/r/kde/comments/1b9k755/psa_how_to_reenable_libreoffice_integration_in/), setting `export SAL_USE_VCLPLUGIN=kf5` in the terminal and then running libreoffice from the same terminal session makes libreoffice use the Breeze theme again. This would be a temporary fix until Libreoffice updates to QT6.
### Steps To Reproduce
Steps to reproduce the behavior:
1. Enable Plasma 6 and install `libreoffice-qt`
2. Launch libreoffice
3. Bug occurs
### Expected behavior
Libreoffice should be using the Breeze theme that KDE comes with, and when switching between dark and light mode, should also have its theme switched aswell.
### Screenshots
Without using the fix

After applying the fix

### Additional context
Add any other context about the problem here.
### Notify maintainers
@raskin
<!--
Please @ people who are in the `meta.maintainers` list of the offending package or module.
If in doubt, check `git blame` for whoever last touched something.
-->
### Metadata
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
```console
❯ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.7.9, NixOS, 24.05 (Uakari), 24.05.20240310.73d699a`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.1`
- nixpkgs: `/nix/store/s7bsyr7jjqask1p6afmsxyfzady49nmk-source`
```
---
Add a :+1: [reaction] to [issues you find important].
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[issues you find important]: https://github.com/NixOS/nixpkgs/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc
To test, run: SAL_USE_VCLPLUGIN=kf5 libreoffice
Open a terminal.
git clone https://github.com/NixOS/nixpkgs
Edit the line I mentioned.
Run nix build -Lf. libreoffice-qt
Run the libreoffice you just built, using: ./result/bin/libreoffice
However, I’d try first to run export SAL_USE_VCLPLUGIN=kf5
first with the libreoffice
you have already installed globally in $PATH
.
1 Like
Running from terminal after running export SAL_USE_VCLPLUGIN=kf5
or export SAL_USE_VCLPLUGIN=qt5
did the trick! Thank you.
2 Likes
You can either add that env variable the NixOS way or the KDE way (more info on that here ).
1 Like
“KDE way” didn’t actually work for me, but “NixOS way” did. I just added this to my configuration.nix:
{
environment.sessionVariables = {
SAL_USE_VCLPLUGIN = "kf5";
};
}
1 Like