How do I switch to dark mode on Linux? There's no option in the settings for dark mode, and the light mode is burning my eyes.
OS: Ubuntu 24.10 x64
Desktop Environment: GNOME
How do I switch to dark mode on Linux?
-
birdie
- Posts: 490
- Joined: 2. May 2010, 14:19
- Primary OS: Fedora other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows, Linux, other Unixes
- Location: Artem S. Tashkinov
- Contact:
Re: How do I switch to dark mode on Linux?
Create or change your existing shortcut to:
This will force the UI to be dark.
Tested and works in Fedora 42/the official VirtualBox 7.1.6 build.
Code: Select all
env GTK_THEME=Adwaita:dark VirtualBoxTested and works in Fedora 42/the official VirtualBox 7.1.6 build.
- Attachments
-
- virtualbox dark in Linux.png (186.54 KiB) Viewed 12869 times
-
thegripmaster
- Posts: 3
- Joined: 28. Oct 2024, 18:49
Re: How do I switch to dark mode on Linux?
This is what worked for my Fedora 43 running GNOME. This should work in Ubuntu as well. This assumes you pinned the virtualbox app to your dock.
Code: Select all
cp /usr/share/applications/virtualbox.desktop ~/.local/share/applications/
sed -i -E 's/^Exec=VirtualBox(&|$| )/Exec=env GTK_THEME=Adwaita:dark VirtualBox\1/' "$HOME/.local/share/applications/virtualbox.desktop"
update-desktop-database ~/.local/share/applications/
-
thegripmaster
- Posts: 3
- Joined: 28. Oct 2024, 18:49
Re: How do I switch to dark mode on Linux?
There is actually an easier way that I found
Edit your ~/.config/gtk-3.0/settings.ini
Change
gtk-application-prefer-dark-theme=0
to
gtk-application-prefer-dark-theme=1
Close and open VBox. But this will turn all your GTK 3 applications to dark as well.
Edit your ~/.config/gtk-3.0/settings.ini
Change
gtk-application-prefer-dark-theme=0
to
gtk-application-prefer-dark-theme=1
Close and open VBox. But this will turn all your GTK 3 applications to dark as well.
Re: How do I switch to dark mode on Linux?
Hello,
None of the solutions presented here or on the web (QT_QPA_PLATFORMTHEME=qt6ct, etc.) work with VBox 7.2.6r172322 (Qt6.8.2 on xcb) which seems to be the lastest version available...
LMDE7 + i3wm here
All other QT apps (VLC, KeepassXC) are in dark mode as requested.
Any help appreciated.
None of the solutions presented here or on the web (QT_QPA_PLATFORMTHEME=qt6ct, etc.) work with VBox 7.2.6r172322 (Qt6.8.2 on xcb) which seems to be the lastest version available...
LMDE7 + i3wm here
All other QT apps (VLC, KeepassXC) are in dark mode as requested.
Any help appreciated.
Re: How do I switch to dark mode on Linux?
OK found the solution !!!!
MANY thanks to https://github.com/VirtualBox/virtualbo ... 3210665358
Code: Select all
env XDG_CURRENT_DESKTOP=gtk3 /usr/lib/virtualbox/VirtualBoxMANY thanks to https://github.com/VirtualBox/virtualbo ... 3210665358