[qubes-users] Qubes Manager not honoring colour scheme selection

I have gone back and checked my 4.0 installation and on there Qubes Manager definitely changes its colour scheme according to the "Style" selected in

Qubes Menu -> System Tools -> Appearance

I like to use "Adwaita-dark". This changes everything to the dark theme except Qubes Manager.

This is definitely a 4.1 and 4.11 specific problem. Is it a configuration file that i can edit manually that will fix this annoyance?

The bright Qubes Manager kills my eyes at knight.

This is quite easy to fix by installing qt5-qtsyleplugins in dom0 and exporting QT_QPA_PLATFORMTHEME=gtk2 in /etc/environment

--> https://github.com/QubesOS/qubes-issues/issues/7389

1 Like

Ahh, thanks for that info!

Wondered the last couple of month, if QubesOS team would fix that one any day in the future. No I can help myself…

Cheers :slight_smile:

Sven Semmler wrote:

This is quite easy to fix by installing qt5-qtsyleplugins in dom0 and exporting QT_QPA_PLATFORMTHEME=gtk2 in /etc/environment

--> Dom0 GUI does not adhere to selected Xfce/Gtk theme · Issue #7389 · QubesOS/qubes-issues · GitHub

Did the Qubes Manager implementation change from 4.0 to 4.1? I am just asking because i have checked my 4.0 installation and it neither has qt5-qtsyleplugins installed nor does it have an environment variable configured for it.

It is just really odd that this would be needed now when it wasn't needed in the past. It sounds not right having to install software in dom0, something we guard against, just to get Qubes Manager to honor dark theme settings.

Isn't Qubes Manager a GTK application? The qt5-qtsyleplugins and the corresponding environment variable should only be necessary for Qt (KDE) style applications.

seems so, my dark Qubes Manager went white from 4.0 to 4.1 and I didn’t understand why and how to change, since today

Great! It’s working now with the following steps in dom0 terminal:

Download qt5-qtstyleplugins RPM file from:

https://kojipkgs.fedoraproject.org//packages/qt5-qtstyleplugins/5.0.0/39.fc32/x86_64/qt5-qtstyleplugins-5.0.0-39.fc32.x86_64.rpm

Move it from your AppVM to dom0 with:

qvm-run --pass-io <from_AppVM> ‘cat /home/user/Download/qt5-qtstyleplugins-5.0.0-39.fc32.x86_64.rpm’ > /home/<your_dom0_user>/Downloads/qt5-qtstyleplugins-5.0.0-39.fc32.x86_64.rpm

Install the package with:

sudo dnf install -y qt5-qtstyleplugins-5.0.0-39.fc32.x86_64.rpm

then insert in /etc/environment:

-------------[Start]---------------------

QT_QPA_PLATFORMTHEME=gtk2

-------------[End]-----------------------

finally you can check, if all changes were set & working:

[TheGardner@dom0]$ cat /etc/environment
QT_QPA_PLATFORMTHEME=gtk2

[TheGardner@dom0]$ echo $QT_QPA_PLATFORMTHEME
gtk2

[TheGardner@dom0]$ sudo dnf info qt5-qtstyleplugins
Qubes OS Repository for Dom0 1.9 MB/s | 3.0 kB 00:00
Installed Packages
Name : qt5-qtstyleplugins
Version : 5.0.0
Release : 39.fc32
Architecture : x86_64
Size : 1.2 M
Source : qt5-qtstyleplugins-5.0.0-39.fc32.src.rpm
Repository : @System
From repo : qubes-dom0-cached
Summary : Classic Qt widget styles
URL : https://github.com/qtproject/qtstyleplugins
License : LGPLv2 or GPLv2
Description : Classic Qt widget styles, including cleanlooks, motif, plastique, qgtk.

FINISHED!
Just restart your machine and voila → Qubes Manager in dark style!

This is not safe. You can do:

sudo qubes-dom0-update qt5-qtstyleplugins

and it will work as with any other package.

That reminds me: Marek, should we set repo_gpgcheck=1 and/or
%_pkgverify_level all in dom0, to protect against mistakes like this?
- --
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab

Thanks very much Demi Marie.
Then this should be the correct way:

Source & Info: https://github.com/QubesOS/qubes-issues/issues/7389

Install the package qt5-qtstyleplugins with:

sudo qubes-dom0-update qt5-qtstyleplugins

then insert in /etc/environment:

-------------[Start]---------------------
QT_QPA_PLATFORMTHEME=gtk2
-------------[End]-----------------------

in dom0 terminal do:

export QT_QPA_PLATFORMTHEME=gtk2

FWIW: https://github.com/QubesOS/qubes-issues/issues/7628

I tried this but didn't succeed.

sudo qubes-dom0-update qt5-qtstyleplugins
sudo qubes-dom0-update
export QT_QPA_PLATFORMTHEME=gtk2

cat /etc/environment QT_QPA_PLATFORMTHEME=gtk2
cat: 'QT_QPA_PLATFORMTHEME=gtk2': No such file or directory

Qube Manager is still white ^^. Any ideas?

TheGardner:

I tried this but didn't succeed.

sudo qubes-dom0-update qt5-qtstyleplugins
sudo qubes-dom0-update
export QT_QPA_PLATFORMTHEME=gtk2

cat /etc/environment QT_QPA_PLATFORMTHEME=gtk2
cat: 'QT_QPA_PLATFORMTHEME=gtk2': No such file or directory

Qube Manager is still white ^^. Any ideas?

You have to actually edit the file `/etc/environment` in order to insert the string `QT_QPA_PLATFORMTHEME=gtk2` into that file, then reboot afterward.

P.S. -- Please avoid top-posting.

that should be the solution. Did it wrong also on my first try. After editing the /etc/environment , it works…