Global Dark Theme For Qt (KDE) Based Applications

81 views
Skip to first unread message

Qubes

unread,
Jun 23, 2020, 10:47:20 AM6/23/20
to qubes...@googlegroups.com
Hi

There is a very nice article in the Qubes docs,
https://www.qubes-os.org/doc/dark-theme/, explaining how to (manually)
enable a dark theme globally for your AppVMs. A fairly straight forward
settings might I add. But the setting only applies to GTK (GNOME) based
applications.

Would anybody here know how you apply a global dark theme to your
AppVM(s) for Qt (KDE) based applications like Amarok, Krusader, etc?


Regards

Sven Semmler

unread,
Jun 23, 2020, 11:38:01 AM6/23/20
to qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 6/23/20 9:47 AM, Qubes wrote:
> Would anybody here know how you apply a global dark theme to your
> AppVM(s) for Qt (KDE) based applications like Amarok, Krusader,
> etc?

Install qt5ct and style plugins ...

Fedora: sudo dnf install qt5ct qt5-qtstyleplugins
Debian: sudo apt install qt5ct qt5-style-plugins

Then set QT_QPA_PLATFORMTHEME=qt5ct in etc/environment and reboot the
qube.

Now launch qt5ct and select the 'gtk2' theme. If you are simply using
Adwaita-Dark then qt5ct has a dedicated theme for that. Or you may
install and select the themes you mentioned.

Finally there is also the Kvantum engine with it's dedicated manager
you could search for.

I found this page supremely helpful:
https://wiki.archlinux.org/index.php/Uniform_Look_for_QT_and_GTK_Applica
tions

/Sven

- --
public key: https://www.svensemmler.org/0x8F541FB6.asc
fingerprint: D7CA F2DB 658D 89BC 08D6 A7AA DA6E 167B 8F54 1FB6
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE18ry22WNibwI1qeq2m4We49UH7YFAl7yIc8ACgkQ2m4We49U
H7YECxAAkjC4vlvYBhYDp/tzAdDGOv2Sx88d5o7JVxiJLgz5tzs3rSsMTJzCiSyd
YcvqBZUH0u5X0C4dPkjrZW7ZRxXMUz1AP9zwEiVN6TiThpgZ3gaY5ZLeR7YqywbO
NpEiLI6CT91awx+EeJM+iTCQxl2qrJcWMt9UihLpGIKYmdK5TCs9asFQo9pmib4D
SoOCdTLnmSwQ8RLP+iiSjsgDf2eTT+BZZy2+HstQFuw8KzmZmH5mXYWRUrMOVOt6
yW9Z4IGB8JWa3V95fVGWQk4LdhaqowVnXSV0HEgRVVagCx+t3HHzXmygmfM4J68X
+/NGoaVh2Ms/PUbs2SueHCv3pWUoRd8EkRm5cWymaKT1EQi3J09vp5WyFFlshdzV
2eGiqk3evRoq3U1bZp/RnE5xoxBkvhZU9gkAgK3Q8pmFXkGnmABYmaWqdpwQ9Lsx
d2Iq0J+NfnzUjlWYZdgCrKdLteUv624YBi2fFGdyMlObqUGBlDFEkBNs+YL7cWHf
qISI9HJvqRueD/agWauYzeojyI9mx2jaWCS8To4G3d9fI6oTglkTmHbWhvxj1Z8N
fTTigAeKWQ8gcYjIPMd/dO3xj5pWUTI7KwlO4QXgZM5YdCTrwQ0emqoQmIpDKCSh
rBXOu3pOOUgU+jINs8RdeMMpHfSdpvx65Ik/Inxd2Tk0cnrQj/4=
=mIGs
-----END PGP SIGNATURE-----

Qubes

unread,
Jun 26, 2020, 7:55:51 AM6/26/20
to qubes...@googlegroups.com
On 6/23/20 5:37 PM, Sven Semmler wrote:
> Install qt5ct and style plugins ...
>
> Fedora: sudo dnf install qt5ct qt5-qtstyleplugins
> Debian: sudo apt install qt5ct qt5-style-plugins
>
> Then set QT_QPA_PLATFORMTHEME=qt5ct in etc/environment and reboot the
> qube.
>
> Now launch qt5ct and select the 'gtk2' theme.

Thank you for your instructions, but I have a problem. I first thought
it was because I was using a Fedora-30 TemplateVM for my test so I
upgraded to Fedora-31, but same problem.

After installing the qt5 packages I edit the Qubes settings and I add
'Qt5 Settings' to the TemplateVMs 'Applications'. As soon as I start
'Qt5 Settings' there is an error message at the top of the window 'The
application is not configured correctly'. If I ignore it and click on
the 'Style' dropdown menu anyway to select 'gtk2' the window freezes as
I click on 'gtk2' from the dropdown menu. I have to reboot the VM to
recover it. I can choose any of the other options in the dropdown menu
and Apply them without problems.
Qt5ct-Error.png

Sven Semmler

unread,
Jun 28, 2020, 5:28:30 PM6/28/20
to qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 6/26/20 6:55 AM, Qubes wrote:
> As soon as I start 'Qt5 Settings' there is an error message at the
> top of the window 'The application is not configured correctly'.

- - have you clicked the "Information" button to see what it says?
- - have you defined QT_QPA_PLATFORMTHEME=qt5ct in etc/environment or
otherwise?
- - can you start qt5ct from the qubes terminal? what output do you get?

/Sven

- --
public key: https://www.svensemmler.org/0x8F541FB6.asc
fingerprint: D7CA F2DB 658D 89BC 08D6 A7AA DA6E 167B 8F54 1FB6
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE18ry22WNibwI1qeq2m4We49UH7YFAl75C14ACgkQ2m4We49U
H7aSvA/9GpEX6APUX05SSpLrw8ey3crlzKcM5dGng5BwMKThPZo8D5oCmLlOKz01
RqaZnV/9qY5FWtcITfm0L0C1ZZUwud5TUL14JES/BMB4FWSD9CVnIYGeZqoicZQe
XbR/NQ+ESNSYFGTyCU9lqvrLWR/zi78aX1AolXrnE2/+9Zdx2ufiA4b3x4TWlPhh
XW7u/86hvVUhFOnJoB3wvm5khuBVhfdPkrgsjyEGfawXH8ynrpuY7jUieBXahEzw
wJpb/0r0zsn0etb5mNdkNlqtX27NGUFRtjbDcJkui6urVcEgQUIrFmfPQvmvihj/
pkoyC6fdTwQLhaFO4/nvla7PkQ/vjh+aEPP+ltn6BkWOFnklw4hDdroxJDhtA3cb
wcYPmvnmBpjeZFiZ29p2MIp9zvN4J5qo+W/eSCbONykwnjmorgCTCfNktwoZ0dat
mGxoYtIMNhRopP4SyyO7GhFpxIe6+ui4ymo4V/CqD4or486A59l1ZxYP//xk5sn/
qHrGCTSVpi3hzw18NZxHuwPckeLWuPRujYc7ggc36aCREpikFfiB/ZbIeMaekQm7
iVtXEJK0D+7saRapz9KkpM8+yjmeHa7gsoDHsy7BNkBBXjXlpOfIjtiTiQzfsRqC
S8g6ZkU/GC5V/UNKcj7ErbCAOZylQABiuDvevh3MOGXkXa8uh4o=
=hoS1
-----END PGP SIGNATURE-----

Qubes

unread,
Aug 10, 2020, 12:10:13 PM8/10/20
to qubes...@googlegroups.com
On 6/23/20 5:37 PM, Sven Semmler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> On 6/23/20 9:47 AM, Qubes wrote:
>> Would anybody here know how you apply a global dark theme to your
>> AppVM(s) for Qt (KDE) based applications like Amarok, Krusader,
>> etc?
>
> Install qt5ct and style plugins ...
>
> Fedora: sudo dnf install qt5ct qt5-qtstyleplugins
> Debian: sudo apt install qt5ct qt5-style-plugins
>
> Then set QT_QPA_PLATFORMTHEME=qt5ct in etc/environment and reboot the
> qube.
>
> Now launch qt5ct and select the 'gtk2' theme. If you are simply using
> Adwaita-Dark then qt5ct has a dedicated theme for that. Or you may
> install and select the themes you mentioned.
>

For me this only works on Debian, the 'Qt5 Settings' application does
not work as it should Fedora (30, 31, 32).

> Finally there is also the Kvantum engine with it's dedicated manager
> you could search for.
>
Kvantum looks like something I am checking this out as well. Maybe
Kvantum will play better with Fedora than the Qt5 control panel.

Chris Laprise

unread,
Aug 10, 2020, 12:22:18 PM8/10/20
to qubes...@googlegroups.com
Yeah, the best option seems to be Debian template, install KDE with
'tasksel' command, then run 'systemsettings5' to select the KDE theme or
color scheme.

--
Chris Laprise, tas...@posteo.net
https://github.com/tasket
https://twitter.com/ttaskett
PGP: BEE2 20C5 356E 764A 73EB 4AB3 1DC4 D106 F07F 1886

qtpie

unread,
Aug 15, 2020, 9:04:34 AM8/15/20
to qubes...@googlegroups.com
Chris Laprise:
>>
>> On 6/23/20 9:47 AM, Qubes wrote:
>>> Would anybody here know how you apply a global dark theme to your
>>> AppVM(s) for Qt (KDE) based applications like Amarok, Krusader,
>>> etc?
>>
>> Install qt5ct and style plugins ...
>>
>> Fedora: sudo dnf install qt5ct qt5-qtstyleplugins
>> Debian: sudo apt install qt5ct qt5-style-plugins
>>
>> Then set QT_QPA_PLATFORMTHEME=qt5ct in etc/environment and reboot the
>> qube.
>>
>> Now launch qt5ct and select the 'gtk2' theme. If you are simply using
>> Adwaita-Dark then qt5ct has a dedicated theme for that. Or you may
>> install and select the themes you mentioned.
>>
>
> For me this only works on Debian, the 'Qt5 Settings' application does
> not work as it should Fedora (30, 31, 32).

set QT_QPA_PLATFORMTHEME=qt5ct in ~/.profile, works for me in fedora
with for instance keepassxc.

Reply all
Reply to author
Forward
0 new messages