Can Virtual Machine Manager NOT be blinding white?

Several months ago after installing kdelinux in one of my tower’s SSDs, i successfully setup QEMU/KVM/libvirt/virt-manager per the nice method here . It seems to work ok, albeit some of virt-manager’s normal features are unavailable, alas. My biggest problem with it though is that so far i have been unable to make it respect my desktop’s dark theme, or indeed make it use any dark colouring, so instead it is a horrible blinding bright white. It hurts my eyes to use it in daylight, but is entirely impossible for me at night [i literally must wait til the following daytime to use it again].

Please, can someone who understands, guide me as to how i can make it dark?

As context, i’ve used it for years in tower’s other boot, ArchLinux Plasma, where it entirely respects my dark theme. However, there it is via Repo, not Flatpak.

Do you mean that the VM that virt-manager UI is running is not in dark mode?

For me on Fedora 44 plasma the UI is in dark mode (my preference).

Do you mean the VMs that you are running are not in dark mode?

You need to set dark mode for each VM according to the OS that the VM is running.

Your desktop preference is not sent to the VM (not sure there is a way this could be done).

Yes i mean virt-manager & thus all its VMs are not running in dark mode… hence the “blinding white”. I am not talking about any of the distros i run within the VMs, i am talking about the VMs themselves, ie, virt-manager , which window is blinding white.

I might be wrong but i suspect your experience on Fedora KDE is not relevant to my problem directly, because your system is mutable. I posted specifically in the kdelinux tag here because my subject system for this problem is kdelinux, ie, the immutable system, which makes some operations that are easy on a mutable system harder or impossible. I am really hoping though that someone already knows a kdelinux-centric solution :crossed_fingers:

Adapting a bit from the results I found from a search, this seems to work:

GTK_THEME=Adwaita:dark flatpak run org.virt_manager.virt-manager 

Give that a go, and if it meets your needs, you could edit the application from the launcher (or edit the Flatpak settings in the “Application Permissions” bit of the system settings) to set GTK_THEME=Adwaita:dark as an environment variable.

Thank you. Tomorrow i plan to boot back into kdelinux after the past few weeks happily running my Arch Plasma boot, so i shall try this then. Tbh atm i am apprehensive, because iirc i had already tried setting a GTK theme as an env var in the app permissions for virt-manager in the Plasma System Settings, but maybe i made a mistake… hopefully i did, as then with luck your suggestion might work well :crossed_fingers:

That seems to work ok for me:

Well that looks marvellously encouraging! Would you pls be kind enough to type out here the full Path you used in the first field? I suspect that might be where i made my error.

I didn’t change that field at all, it’s just the default PATH for the app.

But it’s:

/app/bin:/usr/bin:/app/lib/extensions/bin

Something else you could try, instead of setting the environment variable.

In the application permissions, give the app read-only access to the directory xdg-config/gtk-3.0.

Currently this is set by default for Firefox on KDE Linux, but not for other apps. (Setting it for all apps is under discussion.)

I’m curious as to whether enabling this access will enable the virt-manager Flatpak to pick up your dark theme preference, without having to explicitly set it in the environment variable.

Oh that’s a great idea, & now will be the first thing i try instead of / before the env-var… in a few more hours. Many thanks!

It works for me!

You can apply that permission to all apps with run0 flatpak override --filesystem=xdg-config/gtk-3.0.

Anyone who wants to fix this for everyone can submit a patch to the Flathub packaging to add --filesystem=xdg-config/gtk-3.0:ro here: org.virt_manager.virt-manager/org.virt_manager.virt-manager.yaml at master · flathub/org.virt_manager.virt-manager · GitHub

Ehh, I’ll do it. :slight_smile:

Well, i’m sorry to be a nuisance, but atm it’s not fixed for me, in terms of doing it the “proper” way.

Copying the characters verbatim from the post above appears to include an invalid space that then fails the command:

[me@kdelinux:~] $ run0 flatpak override --filesystem=xdg-config/gtk-3.0
error: Unknown option --filesystem=xdg-config/gtk-3.0
[me@kdelinux:~] [1] $

[me@kdelinux:~] [1] $ run0 flatpak override --filesystem=xdg-config/gtk-3.0

[me@kdelinux:~] $

Repeating it without that space then gives no error, which i assumed to mean silent success, but then launching virt-manager just blinds me once again with its arctic whiteness :scream:

Next i intended to try

but when i went to do so, i decided it seems to be pointlessly redundant, given by default afaict it already has RW access:

The thing that did finally work was the original suggestion:

so now happily virt-manager no longer blinds me :tada: – thank you!

However, both of you had success with those other two methods, neither of which worked for me, so afaict there is still something wrong at my end that i don’t understand :woman_shrugging: I presume this means that for me atm other flatpak apps might also not follow my dark theme, given the global fix seems not to have changed anything here.

OK, great :smiley:

That’s not by default, it’s because you had already run run0 flatpak override --filesystem=xdg-config/gtk-3.0. But yes, trying to do it in the Application Permissions GUI is redundant once you have run that command.

I guess your GTK theme settings are different from @ngraham 's? But I never really touch this stuff myself (I’m happy with Breeze Light everywhere) so I don’t know the ins and outs of this I’m afraid.

Ah, ok, thx for explaining!

Maybe i was supposed to log out then in again after that command, to make the change “apply”?

Probably not, I think this should work within session - the override should apply next time you start the app.

I’m guessing a bit really as I don’t know this stuff, but what is in your ~/.config/gtk-3.0/settings.ini ?

Mine begins with:

[Settings]
gtk-application-prefer-dark-theme=false

That’s expected for me since I use a light theme. If it’s also false for you though, that would likely be a problem.

[Settings]
gtk-application-prefer-dark-theme=true
gtk-button-images=true
gtk-cursor-blink=true
gtk-cursor-blink-time=1000
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=24
gtk-decoration-layout=icon:minimize,maximize,close
gtk-enable-animations=true
gtk-font-name=Roboto Condensed, 9
gtk-icon-theme-name=oxylite-png
gtk-menu-images=true
gtk-modules=colorreload-gtk-module:window-decorations-gtk-module:appmenu-gtk-module
gtk-primary-button-warps-slider=true
gtk-shell-shows-menubar=1
gtk-sound-theme-name=ocean
gtk-theme-name=Dracula-pink-accent-standard-buttons
gtk-toolbar-style=3
gtk-xft-dpi=98304

I wonder if this specific theme isn’t available inside the Flatpak, and it falls back to a light theme rather than respecting the gtk-application-prefer-dark-theme=true setting.

There are other dark themes that can be installed from Flathub for use in Flatpak apps (see flatpak search gtk3theme | sort ) but Dracula unfortunately isn’t among them.

Thank you.

Based on your advice, I ran $ flatpak search gtk3theme | sort | grep dark, from which i picked & installed

$ flatpak install org.gtk.Gtk3theme.Yaru-Aubergine-dark org.gtk.Gtk3theme.Yaru-Lavender-dark org.gtk.Gtk3theme.Yaru-Purple-dark

but none of those subsequently showed up in System Settings - Colors & Themes - Application Style - GNOME/GTK Application Style, so… i gave up again, sigh.