Follow system light and dark theme

Hello,

Is there a way for OnlyOffice to automatically sync with the current system theme on Linux (Light or Dark)? If there is no way in the app settings to do it, can I change it with a script or something? I know I can change directly in the .config file of OnlyOffice, but I still need to restart the app for the changes to take effect. Is there a way to refresh the UI without reopening the app?

Thanks!

(I’m on Ubuntu 22.04 with Snap package)

Hello, unfortunately this cannot be done for now, but I’ll inform you if this option becomes available in the future.

Hello! Is there any news?

Hey…

I may tell you that any software installed with snap or flatpak are somehow in a sandboxed environnement… they don’t talk directly to the system…

So the problem reside on snap level “or flatpak” …
Here how to deal with it: How to Change Snap App Theme on Ubuntu (With Examples) - OMG! Ubuntu

Hope this helps…

Document Server version: Comunity
Type of installation of the Document Server: Docker on Linux
OS: Windows
Browser version: Chrome
Additional information: How to explicitly set UI theme to “Same as system”? I see that by default it is already “same as system”. However it doesn’t work when I change system theme until I manually select this mode in the editor.
I checked the documentation but couldn’t find an answer…

Hey @Shirali

Ok… I’m about to literally throw my mind so bear with me please… Promise? :sweat_smile:

Let’s talk a bit about Docker:
It’s not just a “sandboxed environment” like Snap or Flatpak.
Bro (or Sis :thinking:) it’s a full blown mini OS, chilling in its own bubble, absolutely clueless about your desktop’s fashion sense. Like, zero vibes received.

Breakdown of the madness:

  • You are runing ONLYOFFICE in Docker totally isolated Linux environment.
  • Hosted on Linux… inside Windows.
  • Accessed via Chrome, which is just rendering a web page from the server.
  • And you expect it to magically sync its theme with your Windows system?

Humm… That’s like three layers of “nope.” :joy:

What’s really happening:

ONLYOFFICE running in Docker serves a static web UI. When you select “Same as system,” it might try to follow the browser’s theme (like light/dark mode), not your OS theme directly.
You might ask: “But the browser theme changes when I switch the Windows theme?!”:

Hum, yes, but t won’t auto-update the web UI unless you reload the tab.

In résumé… yu gonna have same answer… even tho Docker and snap different universes… on this case! they share this painful truth, they don’t talk to your OS unless you beg them to.
It’s not a bug. It’s just how Docker + web UIs work. They don’t talk to your OS unless you force them to.

To Resume a but more… Anything installed by Docker is governed by Docker. (Like I said, it like a mini OS :wink:)

Hope this clears the cosmic confusion, If not, we’re gonna need a priest and a USB exorcist. :sweat_smile:

2 Likes

I’m joining the comment above. Also, the bug mentioned earlier - setting Theme → Same as system on Linux installations has not been fixed yet.