You are not logged in.

#1 2025-11-24 20:14:07

arismav
Member
Registered: 2025-06-06
Posts: 10

libreoffice stays on light mode

After a recent update, it seems that launching LibreOffice from the gnome launcher starts it at light mode (even though my system is on dark mode), and changing to dark mode from the libreoffice settings does nothing.
On the contrary, launching it from the terminal uses dark mode, as one would expect.

Offline

#2 2025-11-25 14:00:55

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: libreoffice stays on light mode

https://wiki.archlinux.org/title/Dark_m … ibreoffice
https://wiki.archlinux.org/title/Dark_m … tching#GTK

diff <(printenv | sort) <(tr '\0' '\n' < /proc/$(pidof gnome-shell)/environ | sort)

This is gonna hinge on the GTK_THEME variable or xdg-desktop-portal

Offline

#3 2025-11-25 20:12:49

arismav
Member
Registered: 2025-06-06
Posts: 10

Re: libreoffice stays on light mode

The output says `GTK_THEME=Adwaita:dark`, am I missing something?

Offline

#4 2025-11-25 20:18:28

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: libreoffice stays on light mode

You're apparently exporting that to the interactive shell but not gnome-shell (ie. the session at large)
The variable will drive the behavior and apparently querying xdg-desktop-portal fails (check the system journal for that)

Simple workaround would be to export that more globally/to the session, https://wiki.archlinux.org/title/Environment_variables

Offline

#5 2025-11-25 20:21:27

arismav
Member
Registered: 2025-06-06
Posts: 10

Re: libreoffice stays on light mode

But every other program uses dark mode, it is only libre office as far as I'm aware.

Offline

#6 2025-11-25 20:45:35

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: libreoffice stays on light mode

seth wrote:

apparently [libreoffice] querying xdg-desktop-portal fails (check the system journal for that)

Offline

#7 2025-11-25 21:39:28

arismav
Member
Registered: 2025-06-06
Posts: 10

Re: libreoffice stays on light mode

Tried grepping for xdg and libreoffice in journalctl but can't identify something relevant unfortunately. Would there be anything specific to look out for?

Offline

#8 2025-11-25 21:50:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: libreoffice stays on light mode

unset GTK_THEME
libreoffice

Does that print anything?

Tried grepping for xdg and libreoffice in journalctl

sudo journalctl -b | grep -iC 5 xdg

Offline

#9 2025-11-25 21:59:49

arismav
Member
Registered: 2025-06-06
Posts: 10

Re: libreoffice stays on light mode

seth wrote:
sudo journalctl -b | grep -iC 5 xdg

Dumping the output here:

Nov 24 20:54:45 pc_name (systemd)[620]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[username] ruser=[<unknown>] rhost=[<unknown>]
Nov 24 20:54:45 pc_name (systemd)[620]: pam_unix(systemd-user:session): session opened for user username(uid=1000) by username(uid=0)
Nov 24 20:54:45 pc_name systemd[1]: Reached target User and Group Name Lookups.
Nov 24 20:54:45 pc_name systemd[1]: Starting Accounts Service...
Nov 24 20:54:45 pc_name systemd-logind[550]: New session '1' of user 'username' with class 'manager' and type 'unspecified'.
Nov 24 20:54:45 pc_name systemd-xdg-autostart-generator[637]: Exec binary '/usr/bin/vivaldi-stable' does not exist: No such file or directory
Nov 24 20:54:45 pc_name systemd-xdg-autostart-generator[637]: /home/username/.config/autostart/vivaldi-stable.desktop: not generating unit, executable specified in Exec= does not exist.
Nov 24 20:54:45 pc_name accounts-daemon[627]: started daemon version 23.13.0
Nov 24 20:54:45 pc_name systemd[1]: Started Accounts Service.
Nov 24 20:54:45 pc_name systemd-logind[550]: New session '2' of user 'gdm-greeter' with class 'greeter' and type 'wayland'.
Nov 24 20:54:45 pc_name systemd[1]: Created slice User Slice of UID 60578.
Nov 24 20:54:45 pc_name systemd[1]: Starting User Runtime Directory /run/user/60578...
--
Nov 24 20:54:46 pc_name NetworkManager[542]: <info>  [1764014086.8483] manager: (p2p-dev-wlp1s0): new 802.11 Wi-Fi P2P device (/org/freedesktop/NetworkManager/Devices/3)
Nov 24 20:54:46 pc_name NetworkManager[542]: <info>  [1764014086.8484] device (p2p-dev-wlp1s0): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
Nov 24 20:54:46 pc_name NetworkManager[542]: <warn>  [1764014086.8485] device (p2p-dev-wlp1s0): error setting IPv4 forwarding to '0': Resource temporarily unavailable
Nov 24 20:54:46 pc_name NetworkManager[542]: <info>  [1764014086.8487] device (wlp1s0): state change: unavailable -> disconnected (reason 'supplicant-available', managed-type: 'full')
Nov 24 20:54:46 pc_name NetworkManager[542]: <info>  [1764014086.8489] device (p2p-dev-wlp1s0): state change: unavailable -> disconnected (reason 'none', managed-type: 'full')
Nov 24 20:54:46 pc_name gnome-shell[752]: Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.
Nov 24 20:54:46 pc_name systemd[1]: Starting Locale Service...
Nov 24 20:54:46 pc_name systemd[647]: Created slice Slice /app/dbus-:1.2-org.gnome.Shell.Screencast.
Nov 24 20:54:46 pc_name systemd[647]: Started dbus-:1.2-org.gnome.Shell.Screencast@0.service.
Nov 24 20:54:46 pc_name systemd[647]: Starting sandboxed app permission store...
Nov 24 20:54:46 pc_name systemd[647]: Started sandboxed app permission store.
--
Nov 24 20:54:55 pc_name gnome-session-service[2445]: Desktop file /home/username/.config/autostart/vivaldi-stable.desktop couldn't be parsed, or references a missing TryExec binary
Nov 24 20:54:55 pc_name systemd[620]: Starting Virtual filesystem service...
Nov 24 20:54:55 pc_name systemd[620]: Started Virtual filesystem service.
Nov 24 20:54:55 pc_name gnome-session-service[2445]: App xapp-sn-watcher.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 20:54:55 pc_name gnome-session-service[2445]: App gnome-keyring-pkcs11.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 20:54:55 pc_name gnome-session-service[2445]: App xdg-user-dirs.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 20:54:55 pc_name gnome-session-service[2445]: App at-spi-dbus-bus.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 20:54:55 pc_name gnome-session-service[2445]: App gnome-keyring-secrets.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 20:54:55 pc_name systemd[620]: Started GNOME Session Manager (session: gnome).
Nov 24 20:54:55 pc_name systemd[620]: Reached target GNOME Session Manager is ready.
Nov 24 20:54:55 pc_name systemd[620]: Starting GNOME Shell on Wayland...
--
Nov 24 20:54:55 pc_name gnome-shell[2460]: Using public X11 display :0, (using :1 for managed services)
Nov 24 20:54:55 pc_name gnome-shell[2460]: Using Wayland display name 'wayland-0'
Nov 24 20:54:56 pc_name systemd[620]: Created slice Slice /app/dbus-:1.20-org.a11y.atspi.Registry.
Nov 24 20:54:56 pc_name systemd[620]: Started dbus-:1.20-org.a11y.atspi.Registry@0.service.
Nov 24 20:54:56 pc_name at-spi2-registryd[2516]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Nov 24 20:54:56 pc_name gnome-shell[2460]: Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.
Nov 24 20:54:56 pc_name systemd[620]: Created slice Slice /app/dbus-:1.1-org.gnome.Shell.Screencast.
Nov 24 20:54:56 pc_name systemd[620]: Started dbus-:1.1-org.gnome.Shell.Screencast@0.service.
Nov 24 20:54:56 pc_name systemd[620]: Starting sandboxed app permission store...
Nov 24 20:54:56 pc_name systemd[620]: Started sandboxed app permission store.
Nov 24 20:54:56 pc_name systemd[620]: Created slice Slice /app/dbus-:1.1-org.gnome.Shell.CalendarServer.
--
Nov 24 21:00:26 pc_name systemd[1]: Reloading...
Nov 24 21:00:26 pc_name systemd[1]: Reloading finished in 148 ms.
Nov 24 21:00:26 pc_name systemd[620]: Received SIGRTMIN+25 from PID 1 (systemd).
Nov 24 21:00:26 pc_name systemd[1]: Reloading User Manager for UID 1000...
Nov 24 21:00:26 pc_name systemd[620]: Reexecuting.
Nov 24 21:00:26 pc_name systemd-xdg-autostart-generator[16945]: Exec binary '/usr/bin/vivaldi-stable' does not exist: No such file or directory
Nov 24 21:00:26 pc_name systemd-xdg-autostart-generator[16945]: /home/username/.config/autostart/vivaldi-stable.desktop: not generating unit, executable specified in Exec= does not exist.
Nov 24 21:00:26 pc_name systemd[1]: Reloaded User Manager for UID 1000.
Nov 24 21:00:27 pc_name systemd[1]: Queuing reload/restart jobs for marked units…
Nov 24 21:00:27 pc_name sh[662]: 21:00:27.0755 [INFO] Entered layer:
Nov 24 21:00:27 pc_name sh[662]: (deflayer spc_layer
Nov 24 21:00:27 pc_name sh[662]:  _    _    _    _    _    _    _    _    _    _    _    _    _    _
--
Nov 24 21:22:15 pc_name gnome-shell[50223]: Using public X11 display :1024, (using :1025 for managed services)
Nov 24 21:22:15 pc_name gnome-shell[50223]: Using Wayland display name 'wayland-0'
Nov 24 21:22:15 pc_name systemd[50189]: Created slice Slice /app/dbus-:1.10-org.a11y.atspi.Registry.
Nov 24 21:22:15 pc_name systemd[50189]: Started dbus-:1.10-org.a11y.atspi.Registry@0.service.
Nov 24 21:22:15 pc_name at-spi2-registryd[50274]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Nov 24 21:22:15 pc_name gnome-shell[50223]: Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.
Nov 24 21:22:15 pc_name systemd[1]: Starting Locale Service...
Nov 24 21:22:15 pc_name systemd[50189]: Created slice Slice /app/dbus-:1.2-org.gnome.Shell.Screencast.
Nov 24 21:22:15 pc_name systemd[50189]: Started dbus-:1.2-org.gnome.Shell.Screencast@0.service.
Nov 24 21:22:15 pc_name systemd[50189]: Starting sandboxed app permission store...
Nov 24 21:22:15 pc_name systemd[50189]: Started sandboxed app permission store.
--
Nov 24 21:22:18 pc_name gnome-session-service[51663]: Desktop file /home/username/.config/autostart/vivaldi-stable.desktop couldn't be parsed, or references a missing TryExec binary
Nov 24 21:22:18 pc_name systemd[620]: Starting Virtual filesystem service...
Nov 24 21:22:19 pc_name systemd[620]: Started Virtual filesystem service.
Nov 24 21:22:19 pc_name gnome-session-service[51663]: App xapp-sn-watcher.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 21:22:19 pc_name gnome-session-service[51663]: App gnome-keyring-pkcs11.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 21:22:19 pc_name gnome-session-service[51663]: App xdg-user-dirs.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 21:22:19 pc_name gnome-session-service[51663]: App at-spi-dbus-bus.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 21:22:19 pc_name gnome-session-service[51663]: App gnome-keyring-secrets.desktop sets X-GNOME-Autostart-Phase, but gnome-session no longer manages session services
Nov 24 21:22:19 pc_name systemd[620]: Started GNOME Session Manager (session: gnome).
Nov 24 21:22:19 pc_name systemd[620]: Reached target GNOME Session Manager is ready.
Nov 24 21:22:19 pc_name systemd[620]: Starting GNOME Shell on Wayland...
--
Nov 24 21:22:19 pc_name gnome-shell[51677]: Using public X11 display :0, (using :1 for managed services)
Nov 24 21:22:19 pc_name gnome-shell[51677]: Using Wayland display name 'wayland-0'
Nov 24 21:22:19 pc_name systemd[620]: Created slice Slice /app/dbus-:1.13-org.a11y.atspi.Registry.
Nov 24 21:22:19 pc_name systemd[620]: Started dbus-:1.13-org.a11y.atspi.Registry@0.service.
Nov 24 21:22:19 pc_name at-spi2-registryd[51734]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Nov 24 21:22:19 pc_name gnome-shell[51677]: Unset XDG_SESSION_ID, getCurrentSessionProxy() called outside a user session. Asking logind directly.
Nov 24 21:22:19 pc_name systemd[620]: Created slice Slice /app/dbus-:1.2-org.gnome.Shell.Screencast.
Nov 24 21:22:19 pc_name systemd[620]: Started dbus-:1.2-org.gnome.Shell.Screencast@0.service.
Nov 24 21:22:19 pc_name systemd[620]: Starting sandboxed app permission store...
Nov 24 21:22:19 pc_name systemd[620]: Started sandboxed app permission store.
Nov 24 21:22:19 pc_name systemd[620]: Created slice Slice /app/dbus-:1.2-org.gnome.Shell.CalendarServer.

Last edited by arismav (2025-11-26 06:50:39)

Offline

#10 2025-11-25 22:05:58

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: libreoffice stays on light mode

Please use [code][/code] tags.
It's a bit weird that there isn't *any* portal noise…

ps aux | grep portal

Does LO run in light mode when you unset GTK_THEME ?

seth wrote:

Simple workaround would be to export that more globally/to the session, https://wiki.archlinux.org/title/Environment_variables

Offline

#11 2025-11-26 06:53:16

arismav
Member
Registered: 2025-06-06
Posts: 10

Re: libreoffice stays on light mode

Sorry, just added code blocks.

Yes, unsetting GTK_THEME and launching from the terminal makes it light.

Adding GTK_THEME=Adwaita:dark in /etc/environment/ works, but makes some other windows (e.g. nautilus) look a bit broken.

P.S.
If I'm honest, I don't care *that* much about the matter, as I could just edit all the .desktop files as temporary fix.
Just though some others might have the same issue, and I'm also really curious about what's going on here.

Last edited by arismav (2025-11-26 06:59:59)

Offline

#12 2025-11-26 07:20:52

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: libreoffice stays on light mode

So it is the variable that controls the behavior for LO - export it globally/to the session (nb. you'll lose dynamic control as a side effect) or edit/shadow the LO .desktop service to have it run something like "env GTK_THEME=Adwaita:dark libreoffice %F"
Edit: F5uck

Edit #2: do you btw actually use the GTK4 SAL, https://wiki.archlinux.org/title/LibreOffice#Theme ?

Last edited by seth (2025-11-26 07:24:35)

Offline

#13 2025-11-27 22:04:47

arismav
Member
Registered: 2025-06-06
Posts: 10

Re: libreoffice stays on light mode

Apologies for the late reply.

Just tested the GTK4 SAL setting at /etc/profile.d/libreoffice-fresh.sh and it seems to work like a charm, thanks a lot for the suggestion!

Offline

#14 2025-11-27 22:29:09

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,672

Re: libreoffice stays on light mode

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Since this seems a regression, does it hinge on the SAL (ie. eg GTK3 ./. GTK4?)

Offline

Board footer

Powered by FluxBB