Set light theme as default

dietzmpe

New Member
Mar 31, 2023
4
1
3
Hello,
is there a possibility to set the light theme as default theme for Proxmox BS 2.4-1? Maybe through editing the proxmoxlib.js under /usr/share/javascript/proxmox-widget-toolkit?

Thanks in advance!
 
Last edited:
  • Like
Reactions: Cedrox
Hi,

the default is hard-coded as auto at the moment, changing the default is also a bit tricky due to how the auto-Theme needs to be handled. However, we discussed setting a default theme as a configuration option before, so you may want to open a feature request over at our Bugzilla [1].

May I ask why you need that option, though? After all the theme selector costs you like three clicks once. But maybe I'm missing something.

[1]: https://bugzilla.proxmox.com
 
Something I should mention here: If you set the preferred color scheme for your browser/OS correctly, the correct theme should be loaded automatically already.

For Firefox you should be able to set that in the general settings.
And for Chrom(e|ium-based browser) here: https://support.google.com/chrome/answer/9275525 (or with the --force-dark-mode command line flag on Linux)
For Edge and Safari you need to set the system settings correctly as far as I know, so this behaves similarlly to Chrome on these platforms
 
Hi,
the default is hard-coded as auto at the moment, changing the default is also a bit tricky due to how the auto-Theme needs to be handled. However, we discussed setting a default theme as a configuration option before, so you may want to open a feature request over at our Bugzilla [1].
okay, but nevertheless I would like to change this setting. Could you provide me the filepath and, if possible, the line where I can change it?
May I ask why you need that option, though? After all the theme selector costs you like three clicks once. But maybe I'm missing something.
It is quite simple: I don't like the dark theme of Proxmox but I like the dark mode in Waterfox/Brave. And as long as Proxmox takes the browser theme as theme for the Webinterface, everytime I clear my cookies/cache I have to reset the theme to light mode.

Best regards
 
okay, but nevertheless I would like to change this setting. Could you provide me the filepath and, if possible, the line where I can change it?
In the case of Proxmox Backup Server this is a bit tricky. The code handling the theme Cookie is part of the backend and, thus written in Rust requiring you to patch that repo and re-compile it on every release (although, you could probably automate that with an APT hook).

Theoretically you could replace the CSS file that implements the dark theme with an empty file (/usr/share/javascript/proxmox-widget-toolkit/themes/theme-proxmox-dark.css), but that may result in an unsupported setup. Currently, this shouldn't really have any side effects, but this may change in the future. It will also require you to replace that file with every update of the proxmox-widget-toolkit. Note that this only works if you want the light theme to be the default.

It is quite simple: I don't like the dark theme of Proxmox but I like the dark mode in Waterfox/Brave. And as long as Proxmox takes the browser theme as theme for the Webinterface, everytime I clear my cookies/cache I have to reset the theme to light mode.
Not sure about Brave, but in Waterfox you can totally set the "Website appearance" separately from the browser's theme in the general settings. First just set the Theme you want, then set the "Website appearance".
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!