Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] KDE Color themes not applying correctly (Read 4932 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[SOLVED] KDE Color themes not applying correctly

I recently migrated the user folder from my old Ubuntu installation to my Artix install. In doing so, there has been some breakage due to folders of the Ubuntu install being given root permissions where they would normally be user permissions.

One of my issues is color themes for KDE Plasma are not applying correctly. While certain parts of QT change accordingly, others like the view area remain stock "Breeze" no matter what theme I choose- even "Breeze Dark". It really looks like something that would be solved by a reboot. But, alas, it never is.
I also ensured "/home/$USER$/.kde/share/apps/color-schemes" has user permissions. Still, nothing.

Any ideas of where I should look to next? Is this not a permissions issue and something that can be solved some other way?

Re: KDE Color themes not applying correctly

Reply #1
In KDE you probably need to check in system settings places like:
- Global theme
- Plasma style
- Application style
- Colors

The "colors" themes apply only for some parts which are written in QML, for other programs you probably need to check application style or something else. KDE is a monster in this case.

Re: KDE Color themes not applying correctly

Reply #2
Oh, I forgot to mention I've messed with the system settings a good deal. No combination of global theme, plasma style, application style, etc. makes colors apply correctly. So, my guess is some folder related to themes somewhere is locked to root and locking the themes out of being applied everywhere. I already had to change the permissions of some folder (can't remember what, sadly) in order to even access color settings in the first place.

Re: KDE Color themes not applying correctly

Reply #3
in such case check your env vars if you have something qt related there

Code: [Select]
env | grep -i qt

Re: KDE Color themes not applying correctly

Reply #4
did you use qt5ct ? or similar program for set gtk/qt theme?

Re: KDE Color themes not applying correctly

Reply #5
Here's the output of
Code: [Select]
env | grep -i qt
Code: [Select]
QT_SCREEN_SCALE_FACTORS=eDP-1=1;DP-1=1;HDMI-1=1;DP-2=1;HDMI-2=1;
QT_QPA_PLATFORMTHEME=gtk
QT_STYLE_OVERRIDE=gtk2
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
QT_AUTO_SCREEN_SCALE_FACTOR=0

Not sure if there's anything useful to glean from it.

>did you use qt5ct ? or similar program for set gtk/qt theme?
I used the "Colors" section of system settings.

Re: KDE Color themes not applying correctly

Reply #6
QT_STYLE_OVERRIDE=gtk2 can make this trouble, can you remove it, and eventually install and use qt5ct ? (you say Qt: hey qt, use my very ugly gtk2 theme instead...)


Unlike Qt4, Qt5 does not ship a qtconfig utility to configure fonts, icons or styles. Instead, it will try to use the settings from the running desktop environment. In KDE Plasma or GNOME this works well, but in other less popular desktop environments or window managers it can lead to missing icons in Qt5 applications. One way to solve this is to fake the running desktop environment by setting XDG_CURRENT_DESKTOP=KDE or GNOME, and then using the corresponding configuration application to set the desired icon set.

Another solution is provided by the qt5ct package, which provides a Qt5 QPA independent of the desktop environment and a configuration utility. After installing the package, run qt5ct to set an icon theme, and set the environment variable QT_QPA_PLATFORMTHEME=qt5ct so that the settings are picked up by Qt applications. Alternatively, use --platformtheme qt5ct as argument to the Qt5 application. (from arch's wiki)

Re: KDE Color themes not applying correctly

Reply #7
As alium mentioned, these 2 env vars  can cause problems:
Code: [Select]
QT_QPA_PLATFORMTHEME=gtk
QT_STYLE_OVERRIDE=gtk2
And  if you are using some other DE/MW other than KDE/Plasma you should use qt5ct

I use qt5ct together with Kvantum and Qt5 looks nice (apart from QML things which i just do not like)

Re: KDE Color themes not applying correctly

Reply #8
Wow, this issue is getting surprisingly tedious.
So, I installed the qt5ct package. I then entered "unset QT_STYLE_OVERRIDE" followed by "export QT_QPA_PLATFORMTHEME=qt5ct" in the terminal.
Despite my output of "env | grep -i qt" having been this:

Code: [Select]
QT_SCREEN_SCALE_FACTORS=eDP-1=1;DP-1=1;HDMI-1=1;DP-2=1;HDMI-2=1;
QT_QPA_PLATFORMTHEME=qt5ct
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
QT_AUTO_SCREEN_SCALE_FACTOR=0

The Qt5 settings tool still gave me this error:

"Please remove the QT_STYLE_OVERRIDE environment variable (current value: gtk2).

The QT_QPA_PLATFORMTHEME environment variable is not set correctly (current value: gtk, required value: qt5ct)."

I tried rebooting. But then, the environment variables were reset, and changing them accordingly did nothing for qt5ct again.

Re: KDE Color themes not applying correctly

Reply #9
Even still, the qt5ct solution is a workaround/compromise. If I want to use proper QT colors, I'm gonna need to solve the root of the problem and not just hack in GTK themes.

Re: KDE Color themes not applying correctly

Reply #10
with qt5ct should be now works kde settings without problems, so you can set color under kde, or?

Re: KDE Color themes not applying correctly

Reply #11
No. Like I said, qt5ct is ignoring the variables I set for some reason- unless I set them wrong somehow

Re: KDE Color themes not applying correctly

Reply #12
how did you set the variables ?
where did you set them?
if in some global file did you at minimum relogin or rebooted ?

Re: KDE Color themes not applying correctly

Reply #13
Quote
I then entered "unset QT_STYLE_OVERRIDE" followed by "export QT_QPA_PLATFORMTHEME=qt5ct" in the terminal.
Despite my output of "env | grep -i qt" having been this:

Code: [Select]
QT_SCREEN_SCALE_FACTORS=eDP-1=1;DP-1=1;HDMI-1=1;DP-2=1;HDMI-2=1;
QT_QPA_PLATFORMTHEME=qt5ct
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
QT_AUTO_SCREEN_SCALE_FACTOR=0

The Qt5 settings tool still gave me this error:

"Please remove the QT_STYLE_OVERRIDE environment variable (current value: gtk2).

The QT_QPA_PLATFORMTHEME environment variable is not set correctly (current value: gtk, required value: qt5ct)."

I tried rebooting. But then, the environment variables were reset, and changing them accordingly did nothing for qt5ct again.

Re: KDE Color themes not applying correctly

Reply #14
how did you change them?

the env vars can be set in many many places.
most used places to set these vars are:
- /etc/environment
- ~/.xinitrc
- ~/.bashrc # or your shell config
- ~/.profile
- ~/.bash_profile

If there is nothing, it can also be somewhere in your DM or some other init scripts.
(I am thinking also about these edge cases since you said you played a bit.)

Changing the variables in one terminal will not change them in your system.
When you change the variables in one terminal the variables will only ba changed in it and in programs you execute from it..
For example, if you change env vars in terminal and then try to start some qt program from ANOTHER terminal (can be your DE/WM, menu, etc) it will use environment variables which were set at the moment it started (at least that is my observation.)

So check where you are setting the variables and change them there, you need to make it permanent.
For some tests you can change it in terminal and start programs from there (but this is truly for testing and hacking only).