You are not logged in.
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
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
The output says `GTK_THEME=Adwaita:dark`, am I missing something?
Offline
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
But every other program uses dark mode, it is only libre office as far as I'm aware.
Offline
apparently [libreoffice] querying xdg-desktop-portal fails (check the system journal for that)
Offline
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
unset GTK_THEME
libreofficeDoes that print anything?
Tried grepping for xdg and libreoffice in journalctl
sudo journalctl -b | grep -iC 5 xdgOffline
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
Please use [code][/code] tags.
It's a bit weird that there isn't *any* portal noise…
ps aux | grep portalDoes LO run in light mode when you unset GTK_THEME ?
Simple workaround would be to export that more globally/to the session, https://wiki.archlinux.org/title/Environment_variables
Offline
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
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
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
\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