Bug 467548

Summary: A new ~/.gtkrc-2.0-kde4 file is always created on boot
Product: [Plasma] plasmashell Reporter: Burgess Chang <bsc>
Component: Startup processAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: kde, luca.bacci, mail, michael2macdonald, nate, qydwhotmail
Priority: NOR    
Version First Reported In: 5.27.2   
Target Milestone: 1.0   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Burgess Chang 2023-03-18 23:02:28 UTC
SUMMARY
I noticed that the gtk configuration file of version 5.27.2 follows the GTK environment variables better, but my home directory still generates the file .gtkrc-2.0-kde4 after every login.
This file looks like it belongs to KDE4 from the naming, has it been deprecated?

STEPS TO REPRODUCE
1. Delete ~/.gtkrc-2.0-kde4
2. Logout and re-login

OBSERVED RESULT
This file is always created or .

EXPECTED RESULT
It no longer create.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Comment 1 michael2macdonald 2023-05-16 01:47:08 UTC
I can recreate the issue on Fedora 38. After a quick search, the issue seems to be located here:

Master branch as of 16/05/2023 01:43 UTC
https://github.com/KDE/plasma-workspace/blob/ad4ddd0456d25420a1b8573fa6884104ee8ae157/kcms/krdb/krdb.cpp#LL283C55-L283C55

There are already existing environment variables for these config files ($GTK_RC_FILES, and $GTK2_RC_FILES), so it should be simple to add an if statement to put them in the provided location if the env_var are set.

==========

Operating System: Fedora Linux 38
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.2.15-300.fc38.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-10210U CPU @ 1.60GHz
Memory: 15.3 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 20S0002FUS
System Version: ThinkPad T14 Gen 1
Comment 2 Nate Graham 2023-05-16 15:29:56 UTC
Indeed, makes sense. Nice catch! Would you be interested in submitting a patch to fix it? I can help if this is an unfamiliar process!