SUMMARY kdeinit5 will overwrite environment variable "GTK2_RC_FILES" and "GTK_RC_FILES". I think kde shouldn't modify environment variable that defined by user manually. And could you please add something behind user defined even if whatever you will modify it. STEPS TO REPRODUCE 1. add "export GTK2_RC_FILES=${XDG_CONFIG_HOME}/gtk-2.0/gtkrc" and "export GTK_RC_FILES=${XDG_CONFIG_HOME}/gtk-2.0/gtkrc" into "~/.config/plasma-workspace/env/desktop.sh" 2. logout and login OBSERVED RESULT use command "echo $GTK2_RC_FILES" and "echo $GTK_RC_FILES", I find $GTK2_RC_FILES is "/etc/gtk-2.0/gtkrc:/home/skyarch/.gtkrc-2.0:/home/skyarch/.config/gtk-2.0/gtkrc:/home/skyarch/.config/gtkrc-2.0" and $GTK_RC_FILES is "/etc/gtk/gtkrc:/home/skyarch/.gtkrc:/home/skyarch/.config/gtk-2.0/gtkrc:/home/skyarch/.config/gtkrc" EXPECTED RESULT the value of $GTK2_RC_FILES is "/home/skyarch/.config/gtk-2.0/gtkrc" only. the value of $GTK_RC_FILES is "/home/skyarch/.config/gtk-2.0/gtkrc" only. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.85.0 Qt Version: 5.15.2
Those environment variables are set by krdb: https://invent.kde.org/plasma/plasma-workspace/-/blob/v5.23.2/kcms/krdb/krdb.cpp#L113 and it's causing kde-gtk-config always create ~/.gtkrc-2.0 in my home directory, even if I don't have gtk2 installed at all. I'm working on a patch to fix this behavior, would it be OK to just remove those 2 environmant variables? They're not present even in GNOME.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1911
Git commit f3a4b45d9e62313c039d1532c192dcc370bd61e4 by Nate Graham, on behalf of Ahmad Samir. Committed on 23/07/2022 at 16:19. Pushed by ngraham into branch 'master'. KRDB: don't override GTK2_RC_FILES or GTK_RC_FILES evn vars if already set FIXED-IN: 5.26 M +6 -1 kcms/krdb/krdb.cpp https://invent.kde.org/plasma/plasma-workspace/commit/f3a4b45d9e62313c039d1532c192dcc370bd61e4