[info] How to make KDE apps run with dark theme in your DE

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
776
Reaction score
633
Credits
4,916
I'm using Cinnamon DE with a few apps from KDE. The theme of Cinnamon is custom made of my own - a seriously reworked colors of a default dark Mint theme. For some time now I had this problem: all apps from KDE would run with white theme, completely ignoring the dark theme I'm using for the whole system. But I finally found a way with some help from two forums. I'll just translate the relevant info to English here.

1.
Code:
sudo pacman -S qt5ct qt5-styleplugins
(replace "pacman -S" with the install command for your distro, if it's not Arch)

2.
Code:
sudo gedit /etc/environment
(replace "gedit" with whatever text editor you're using)

3. In the opened file add this line:
Code:
QT_QPA_PLATFORMTHEME=qt5ct

4. Reboot the system.
5. Open Qt5ct and make your settings for dark theme.
From that moment on all of your KDE apps will appear dark, if you've done the things right.

Note 1: Specifically for kolourpaint you need to have installed the package "breeze-icons" which also contains icons for dark theme ("breeze-dark"). Without "breeze-icons" kolourpaint will most likely appear without any icons - just huge buttons with text on them. And when you switch your KDE apps to dark mode, kolourpaint will appear with the breeze-dark icons.
Note 2: If you don't install qt5-styleplugins, setting things up won't work at all and qt5ct will keep "crying" about the variable "QT_QPA_PLATFORMTHEME" not being set. Unfortunately it won't tell you how to fix that variable and you'll have to spend 45 minutes digging through Google for the solution, so this post of mine is to save you the trouble of all that.
 


With dwm, I had to install qt5ct because dolphin didn’t display any icons for files etc.
I also had to set my XDG_DESKTOP env-var, to fool certain QT applications into thinking they were running inside a full KDE session.

I’ve since switched from dolphin to pcmanfm - much better!!
But I still use a few other QT applications, which rely on my env-var hack.....
 

Members online


Top