qubes-issues
qubes-issues copied to clipboard
Dom0 GUI does not adhere to selected Xfce/Gtk theme
The problem you're addressing (if any)
Starting with R4.1 some of the Qubes OS GUI uses QT5. One effect of this is, that by default those GUI do not adhere to the theme selected in XFCE. This is particularly an issue for users of dark themes.
The solution you'd like
This is quite easy to fix by installing qt5-qtsyleplugins in dom0 and exporting QT_QPA_PLATFORMTHEME=gtk2
The value to a user, and who that user might be
The XFCE/Gtk2 theme selected by the user applies to the Qubes OS GUI as it does to the rest of dom0
Which Qubes GUI components are affected? Currently (in 4.1.1), it seems to me that only the Qube Manager is not adopting the selected system theme. (I do not have the new app menu yet.)
Does your solution fix the Qube Manager?
Are you seeing other GUI tools that are affected?
Are you seeing other GUI tools that are affected?
From the Qubes Tools menu:
Backup Qubes Create Qubes VM Qubes Global Settings Qubes Template Manager Restore Backup
I see, thanks. Since this is technically a regression from 4.0, I think it might be more accurate to classify this as a bug.
This is quite easy to fix by installing qt5-qtsyleplugins in dom0 and exporting QT_QPA_PLATFORMTHEME=gtk2
Unfortunately, this did not work for me on 4.1.1. Various Qubes tools that were not obeying the system theme (including the Qube Manager) are unchanged.
I tried installing the package, then, in dom0:
export QT_QPA_PLATFORMTHEME=gtk2
Then restarting the Qube Manager and starting various tools.
I also tried adding the above to my .bash_profile
in dom0 and then logging out and logging back in.
I also tried changing my theme in dom0 to something else and changing it back again.
Tried with the themes "Adwaita-dark," "Arc-Dark," and "Greybird-dark."
Also tried rebooting the whole system. Still no dice.
Did you restart?
Did you restart?
Yes. Also tried rebooting the whole system. Still no dice.
On 7/20/22 23:49, Andrew David Wong wrote:
Did you restart?
Yes. Also tried rebooting the whole system. Still no dice.
Did you export in /etc/environment? Can you check ...
***@***.*** ~]$ cat /etc/environment
QT_QPA_PLATFORMTHEME=gtk2
***@***.*** ~]$ echo $QT_QPA_PLATFORMTHEME
gtk2
***@***.*** ~]$ 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.
I've done it like this on three different machines. All with R4.1. All work as expected.
May I ask which theme you are using in dom0 XFCE? ... I would like to check what happens if I try it. Maybe there is an issue with that particular theme. There is an issue with some of the Arc themes, I tested them all through for another thread/issue.
Did you export in /etc/environment? Can you check ...
***@***.*** ~]$ cat /etc/environment QT_QPA_PLATFORMTHEME=gtk2
That was the problem. Thanks!
I had just exported from my home directory. I didn't realize it had to be in /etc/environment
.
FWIW, I wasn't familiar with that file, so I tried searching online for how to "export in /etc/environment," and the most helpful thing I found just said to edit it like any other text file, so I just used Vim to type it in manually. I have a feeling that this probably isn't the standard method, but it worked. :shrug:
All the Qubes GUI tools are respecting the system theme now! Thanks again for your help. :)
On 7/21/22 01:34, Andrew David Wong wrote:
I have a feeling that this probably isn't the standard method, but it worked.
Pretty sure it is, unless you intent to start a discussion about your choice of text editor ;-)
Unfortunately, I've found that closing the Qube Manager and reopening it causes it to revert to a light theme. I then have to log out of the desktop environment and log back in to fix it.
I applied the fix and rebooted. All windows are now following the dark theme. Opening and closing the Qubes Manager still keeps the dark theme for me.
Increasing priority and pinning this issue, as a lot of users seem to be asking about it lately.
Hi, I did a fresh install of 4.1.1 changed the theme etc, but the middle of the panel and some widgets aren't adhering to the dark theme (Adwaita Dark). The only way it works here (on two machines) is when I install 4.1.0 first and then simply apply all the updates.
Hi, I did a fresh install of 4.1.1 changed the theme etc, but the middle of the panel and some widgets aren't adhering to the dark theme (Adwaita Dark). The only way it works here (on two machines) is when I install 4.1.0 first and then simply apply all the updates.
Not anymore. It worked last week. Now, the Application Menu, Separator, and the clock are not adhering to Adwaita Dark theme. I checked all the xfce / xfwm configs in dom0. I also compared the configs with my other machine where it still works. I can't find any differences.
Hi, I think I found the root cause and the fix:
Cause:
- xfsettingsd not running, although listed in Session and Startup.
- the text file ~/.cache/sessions/xfce-session-dom0:0 is missing.
Fix:
- Open terminal to dom0, and then:
-
echo > ~/.cache/sessions/xfce4-session-dom0:0
- start xfsettingsd:
xfsettingsd
- Logout with saving current session. On the logout dialog at the button tick the box.
- Login again; dark theme should be applied.
In 4.2 some tools like Qubes Manager or Qubes Template Manager still not following chosen theme. Also workaround by using Qt5-styleplugins seems to be deprecated. Now there is only this error: Cannot mix incompatible Qt library (5.15.5) with this library (5.15.9), but probably there will be more problems in the future. Workaround with manual installing theme for QT applications seems not practical, and third workaround is hard coding theme in the tools...
I'm having problem getting this to work in Qubes 4.2, Its working for change the colour of dom0 file manger at least, but not the Qubes manager
Is there an updated workaround or method for this?
@andrewdavidwong Should probably re-pin this as people upgrading to 4.2 are facing this issue.
This might be related: changing the GTK theme in KDE does fix qubes manager in XFCE, but is also broken for KDE itself (fonts don't change in the settings app, but background colors do, for instance, which is why I can't use KDE and dark mode together now) That's used for gtk applications, are we sure qubes-manager is actually using a qt thene, and not falling back to gtk?
Never mind, ignore me, I'm dumb, it's an effect of th QTSTYLEPLUGINS environmental variable I set as a workaround. bleh