Dark Theme for [Qubes Manager] Not Working in 4.1

In dom0:

$ sudo qubes-dom0-update qt5ct qt5-qtstyleplugins

Then, run:

$ export QT_QPA_PLATFORMTHEME=qt5ct

Then:

$ qt5ct

Here you select Style: gtk2 (to match your current XFCE settings) and you can select also Fonts and Icon Theme.

Only QT_QPA_PLATFORMTHEME=qt5ct needs to be made persistent.

1 Like

Thank you for your answers @necker @fepitre
Unfortunately, using qt5ct didn’t solved the issue. No difference even after a reboot, the gtk2 style seems to be applied only on the “Qt5 Configuration Tool” window.

I think that I will move forward with KDE for now and hope that there is no big issue with this alternative desktop environment.

@nimp Be sure to use the guide I posted above. Official documentation is broken.

1 Like

Have you tried in the same console to run qubes-qube-manager after the export? Because it works on R4.1 as explained to you. To have it persistent, you need to add the export inside e.g. in a /etc/profile.d/.

Thank you for your help, so I created a new file startup.sh in /etc/profile.d/startup.sh with the export line, and it does work only if I launch it from the terminal (by running qubes-qube-manager for example) but my “desktop” theme is still the same and any app launched from it also.
Am I missing something in your instructions ?

export QT_QPA_PLATFORMTHEME=gtk2 in /etc/environment equally does the trick, if the respective dependencies are installed. Not so important in dom0 but if you want to push it into all your templates, it’s nicer to do it this way instead of having to run qt5ct.

2 Likes

A great solution here @nimp :slight_smile: .

in dom0, in terminal, if i go to
~/.config/‘The Qubes Project’/
there’s a
qubes-qube-manager.conf
file inside. I wonder if that config file could have a dark theme setting. there isn’t any now…

I use a dark theme in dom0 and my Qube Manager is dark. This might be an issue with your particular theme.

For me, I have Adwaita-dark selected as the theme. All vms and applications have been told to use dark theme. The Qubes programs are the only ones ignoring the setting, in dom0 or anywhere. Maybe I’m missing something?

How is this done exactly?

returns

bash: qt5ct: command not found

This is insane. Starting Qube Manager from terminal, Qui-domains and applications menu give 3 different Qube Manager styles?!

  1. sudo qubes-dom0-update qt5-qtstyleplugins
  2. add QT_QPA_PLATFORMTHEME=gtk2 into /etc/environment
  3. remove all other defines of QT_QPA_PLATFORMTHEME you might have added in other places
  4. Reboot. Done.
4 Likes

I applied @fepitre’s export, thus got the third style applied when run from terminal. But, long ago I had the other two styles when run from Qui-domains and app menu and never set any platfortheme manually that I’m aware of (I don’t even know where those places could be). Same for Qube Settings window
But, how’s that possible in the first place?

@enmus asked wrote:

But, how’s that possible in the first place?

It probably has to do with the place where you exported QT_QPA_PLATFORMTHEME, more precisely whether it would be in the environment when the respective application gets started.

To illustrate that you can play with this in a dom0 terminal:

[user@dom0 ~] QT_QPA_PLATFORMTHEME=fusion qubes-qube-manager
[user@dom0 ~] QT_QPA_PLATFORMTHEME=gtk2 qubes-qube-manager

In this cases you are explicitly setting the environment variable for the particular launch. If instead of fusion or gtk2 you used qt5ct it would pick up whatever theme you configured in the respective configuration app.

That’s the main reason I set this variable in /etc/environment and only there, to make sure it is exported and available in all contexts.

Thanks for the tips. I tried them all (setting in enviroment too) and they all impact only terminal-started Qube manager. Qube managers started from Qui domains as well as from app menu are immune to this.

How’s that possible?

And as I wrote, even those two differs from each other (it looks like Qui-domains’ ran Qube manager doesn’t follow font size set in System Tools → Appearance?!

@enmus did you reboot your computer after making those changes?

@Sven thanks for the support here. My Qubes has been getting more eyes-friendly now :sunglasses:

Hint: For Firefox, I added the “Dark Reader” Add-on.

Of course I didn’t! Otherwise, I’d assure myself everything was OK now, and my previous post wouldn’t exist. Thanks and apologize.