Forcing GTK Theme in Libreoffice Snap Version

Hi, Libreoffice snap currently cannot find system theme and defaults to white. In the regular libreoffice application, there’s an ability to an uncomment env variable and switch to:

SAL_USE_VCLPLUGIN=gtk3`

This forces the application to use GTK theme

Snap core files cannot be modified to uncomment variables. Is there another way I can force libreoffice to find the GTK theme?

Version: 7.5.1.2 (X86_64) / LibreOffice Community
Build ID: 81bce3cd17f5e01886721863a4fa0d99f91033a6
CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Ubuntu 22.04

Not familiar at all with snap version. In “standard” version, setting environment variable is not enough. You must also have installed the package corresponding to the widget family. By default libreoffice-x11 should be installed for fallback. The other packages are libreoffice-gtk3 (GTK+) and libreoffice-kf5 (Qt).
AFAIK, there is no need to uncomment anything. You launch LO with command
SAL_USE_VCLPLUGIN=xyz soffice &

For better help, edit your question (don’t use a comment to answer) to mention OS name (Linux distro) and LO version (with at least three numbers).

1 Like