Bug 417090 - gtkrc-2.0-kde4 not updated after applying the GTK style
Summary: gtkrc-2.0-kde4 not updated after applying the GTK style
Status: RESOLVED DUPLICATE of bug 415770
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_style (show other bugs)
Version: 5.17.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-03 09:15 UTC by b2.temp
Modified: 2020-02-05 18:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description b2.temp 2020-02-03 09:15:29 UTC
SUMMARY

The custom theme selected for gtk2 apps is not applied.


STEPS TO REPRODUCE
1. select a theme in the kcm style panel
2. apply
3. start a gtk2 app

OBSERVED RESULT

style not changed

EXPECTED RESULT

other style

OTHER INFO

The problem happens because the setting file ~/gtkrc-2.0-kde4 is not updated so basically selecting a theme is a noop; although the preview from the kcm settings is correct.

VERSION INFO

Plasma 5.66.0-1.fc31
Comment 1 b2.temp 2020-02-03 09:56:45 UTC
By the way it's a regression. Using the latest version of Plasma proposed by dnf before Fedora 28 got EOL it worked still.
Comment 2 Mikhail Zolotukhin 2020-02-03 10:12:49 UTC
If you remove ~/gtkrc-2.0-kde4 file, will theme change work?
Comment 3 b2.temp 2020-02-03 12:19:15 UTC
(In reply to Mikhail Zolotukhin from comment #2)
> If you remove ~/gtkrc-2.0-kde4 file, will theme change work?

no, clearly the problem is that the file is not updated when present or not created when absent.
Comment 4 Mikhail Zolotukhin 2020-02-03 12:29:01 UTC
What's your contents of GTK2_RC_FILES environment variable?

echo $GTK2_RC_FILES
Comment 5 b2.temp 2020-02-03 12:38:41 UTC
(In reply to Mikhail Zolotukhin from comment #4)
> What's your contents of GTK2_RC_FILES environment variable?
> 
> echo $GTK2_RC_FILES

/home/mister-freeze/.gtkrc-2.0-kde4
Comment 6 Mikhail Zolotukhin 2020-02-03 12:47:21 UTC
Did you set it by yourself or is set by your distribution?
Comment 7 b2.temp 2020-02-03 12:53:22 UTC
(In reply to Mikhail Zolotukhin from comment #6)
> Did you set it by yourself or is set by your distribution?

it was set automatically after a setup of the Fedora KDE "spin" (https://spins.fedoraproject.org/kde/)
Comment 8 b2.temp 2020-02-03 12:54:18 UTC
(In reply to b2.temp from comment #7)
> (In reply to Mikhail Zolotukhin from comment #6)
> > Did you set it by yourself or is set by your distribution?
> 
> it was set automatically after a setup of the Fedora KDE "spin"
> (https://spins.fedoraproject.org/kde/)

so by my distrivution
Comment 9 Mikhail Zolotukhin 2020-02-03 13:12:37 UTC
Does the output of 

killall kded5; kded5

contains something like

QIODevice::write (QFile, "~/.gtkrc-2.0-kde4"): device not open

?
Comment 10 b2.temp 2020-02-03 13:51:12 UTC
(In reply to Mikhail Zolotukhin from comment #9)
> Does the output of 
> 
> killall kded5; kded5
> 
> contains something like
> 
> QIODevice::write (QFile, "~/.gtkrc-2.0-kde4"): device not open
> 
> ?

sorry don't hold on for an answer to this. I'll check in one day or two.
Comment 11 b2.temp 2020-02-04 14:27:28 UTC
(In reply to Mikhail Zolotukhin from comment #9)
> Does the output of 
> 
> killall kded5; kded5
> 
> contains something like
> 
> QIODevice::write (QFile, "~/.gtkrc-2.0-kde4"): device not open
> 
> ?

No it does not
Comment 12 Mikhail Zolotukhin 2020-02-04 14:29:45 UTC
Then it's strange. Recent version of kde-gtk-config should respect GTK2_RC_FILES environment variable and write config into the path, specified by it.
Comment 13 Mikhail Zolotukhin 2020-02-04 14:42:03 UTC
Could you please also provide the full output of that command?
Comment 14 b2.temp 2020-02-04 15:26:30 UTC
(In reply to Mikhail Zolotukhin from comment #13)
> Could you please also provide the full output of that command?

---
kded5: aucun processus trouvé
kf5.kded: found kded module "colord" by prepending 'kded_' to the library path, please fix your metadata.
colord: "/home/mister-freeze/.local/share/icc/." is not an ICC profile
colord: "/home/mister-freeze/.local/share/icc/.." is not an ICC profile
org.kde.bluez: PendingCall Error: "The name is not activatable"
colord: EDID ICC Profile already exists "/home/mister-freeze/.local/share/icc/edid-e97c68aecd687e7ad22e31ac0d3f7eee.icc"
org.kde.bluez: PendingCall Error: "Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
---
Comment 15 Mikhail Zolotukhin 2020-02-04 17:49:39 UTC
Could you please say, if the Plasma GTKd background service is loaded, by looking at Startup & Shutdown > Background Services ?
Comment 16 b2.temp 2020-02-04 19:23:02 UTC
Unfortunately this panel crashes ksystemsettings5:

---
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(ResetNotification), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
KCrash: Application 'systemsettings5' crashing...
KCrash: Attempting to start /usr/libexec/drkonqi from kdeinit
sock_file=/run/user/1000/kdeinit5__0

[1]+  Stoppé                 systemsettings5
---
Comment 17 b2.temp 2020-02-04 19:51:30 UTC
BTW I had launched systemsettings5 in the console with the hope that there would be a useful message when clicking the "Apply" after selecting the gtk2 style. Nothing happens at all. Same thing for "kcmshell5 kde-gtk-config" or when using gdb or strace.
Comment 18 Mikhail Zolotukhin 2020-02-04 20:11:17 UTC
kcmshell5 kde-gtk-config launches the GTK KCM, that was deleted in 5.18. Are you sure you're selecting a theme in subpage of applications style KCM? (There should be a button near the "Configure Icons and Toolbars..." named "Configure GNOME/GTK Application Style...")
Comment 19 b2.temp 2020-02-04 21:26:47 UTC
yes this is the same thing. As said I just used this as a way to track possible error written in stderr.
Comment 20 b2.temp 2020-02-05 18:18:12 UTC
Sorry the plasma version reported earlier is wrong. It's 5.17.5, explaining why the gtk KCM is still there.
Comment 21 Mikhail Zolotukhin 2020-02-05 18:34:25 UTC
So, it's the same type of bug as 415770. In the next Plasma version there will be a sub page in the application style KCM, and this bug will be fixed. Meanwhile you can create a symbolic link to ~/.gtkrc-2.0

*** This bug has been marked as a duplicate of bug 415770 ***