How can you enable dark mode for VirtualBox (the standard way this is done in Ubuntu seems to not work)

The reason this is a Fedora related issue is as follows:

By default, VirtualBoxes is blindingly white and refuses to respect dark mode settings. However, there normally is a way of overruling this using qt5ct: Giving VirtualBox a dark mode

However, there are two problems in Fedora when using Wayland (as far as I can tell anyways):

  1. There is no ~/.profile file, only a ~/.config directory (and I’m not sure how I would change things in there to deliver the results I’m looking for in VirtualBox regarding dark mode)

  2. Correct me if I am wrong, but qt5ct doesn’t seem to be compatible with Wayland more generally, but for security reasons I would strongly prefer to continue to use Wayland not Xorg.

What I find strange is I believe VirtualBox is a QT program, so I’m curious that if qt5ct isn’t compatible with my setup, then how is a QT program working on my machine in the first place? The fact it is working properly seems to indicate there must be a way of fixing the background in it and forcing it to be in dark mode as I’ve previously done on Ubuntu systems.

You can create this file if you want to. It is a standard file.

Both qt5ct and qt applications can run on wayland.

There are several ways to change qt themes on gnome. qt5ct is one of those.

qgnomeplatform is another.

Thanks, I ended up creating that file and putting in the export statement. I also installed qt5ct and put in the requisite settings but it does not appear to have the same result as in Ubuntu (VirtualBox still has the same color scheme.)

I am also receiving some errors when trying to run qt5ct, there are here below:

I did some research regarding the second error and found a guide for Arch Linux saying to add “QT_QPA_PLATFORMTHEME=qt5ct” to the /etc/environment file: link

I’m not sure if this would work in Fedora and I’m wary of making changes like that to files without being 100% confident of the ramifications.

I’m guessing the fact that this isn’t in there could be causing the issue but I wasn’t able to find confirmation of this for a Fedora OS.

Putting that in your /etc/environment will just put that in your env globally. There shouldn’t be much in the way of ramifications.

Install gnome tweaks

1 Like

thanks, the gnome tweaks legacy option worked perfectly.

1 Like