Bug 261290 - GTK style not remembered after restart
Summary: GTK style not remembered after restart
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
: 261536 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-26 15:19 UTC by Kai Uwe Broulik
Modified: 2011-05-06 01:55 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2010-12-26 15:19:10 UTC
Version:           unspecified (using KDE 4.5.90) 
OS:                Linux

I am using “QtCurve” as GTK style. But after a restart this setting is no longer remembered in KDE 4.6 RC1, it worked in Beta 1/2. When starting Chromium for example, the style is just ugly, grey menus and stuff. In systemsettings the dropdown list has no entry selected although both the QtCurve and the other GTK style are present. You select one, click Apply and it is fine. The setting is remembered the entire setting but restarting KDE makes it forget it. This is really a show-stopper for many users I think.

Reproducible: Always
Comment 1 gleirsch 2010-12-27 09:19:05 UTC
I can confirm this bug. For me, the plain old GTK widgets showed up when using Firefox. Changing the corresponding KDE setting and restarting Firefox solves the problem for the current KDE session ...
Comment 2 Robby Engelmann 2010-12-28 11:24:20 UTC
I confirm that bug for Kubuntu 10.10 with KDE 4.6 RC1.
As a work around:
After each restart the settingsfile in '~/.gtkrc-2.0-kde4' was deleted, so the script (~/.kde/env/gtk2-engines-qtcurve.rc.sh) running on each startup (autostart in system settings)  is not able to export the specific environment variable.

As a workaround I copied the '~/.gtkrc-2.0-kde4' (file is built when choosing qtcurve in systemsettings/GTK apps) into another directory and modified the script to refer to the new location. This works fine for me.
Comment 3 Christoph Feck 2010-12-28 22:48:51 UTC
Since there are no related changes in KDE, I suspect you installed the new oxygen-gtk engine in addition to upgrading KDE. Even if this is not the case, oxygen-gtk authors can be of more help.
Comment 4 Hugo Pereira Da Costa 2010-12-28 23:44:43 UTC
@Christoph

Installing oxygen-gtk should be unrelated. "something" is deleting the ~/.gtkrc-2.0-kde4 config file (where the gtk style inside kde is set), and this is not our style. Only part of kde that modifies this file is the kcm-gtk-module (which is not even part of kde official release if I remember correctly). There might also be a conflict with some other *gtk* code, or possibly even with the linux distribution itself. 

In all cases, this is *not* an oxygen-gtk issue (we never read/write/know of the $HOME/.gtkrcXXX file. 
(and I know nothing about how it is handled, except for the fact that it is quite a mess ...)

Questions: 
1/ does it only happen with QtCurve, or any other gtk style 
2/ does it only happen with KUbuntu ?
Comment 5 Jonathan D. 2010-12-29 08:45:04 UTC
Same here using QtCurve as style for KDE and GTK. GTK style settings are lost each time I log off - log in.
I'm using KDE 4.6RC1 packages from Kubuntu ppa.
Comment 6 Benni Hill 2010-12-29 15:18:51 UTC
> 1/ does it only happen with QtCurve, or any other gtk style 

I can confirm this with the Clearlooks style. (In reply to comment #4)
Comment 7 Christoph Feck 2010-12-29 16:15:15 UTC
*** Bug 261536 has been marked as a duplicate of this bug. ***
Comment 8 Greg Lepore 2011-01-05 22:31:15 UTC
The workaround described in #2 doesn't appear to work for me.  What an annoying bug, definitely a papercut....
Comment 9 Mat Lechner 2011-01-06 16:34:57 UTC
I can also confirm this bug using Kubuntu 10.10, KDE SC 4.6 RC1 and using the oxygen-gtk theme.
Comment 10 Hugo Pereira Da Costa 2011-01-06 17:30:39 UTC
So. The fact that it happens with multiple styles confirms that this is _not_ an oxygen-gtk style. Thus reassigning.

Now I suspect an issue with kcmgtk, or whatever version of it is shipped with kubuntu. (Can anyone who *do not* have kubuntu reproduce the issue ?).

For the record, I'm ccing the "official" maintainers of kcm-gtk (found from source files there). 

I personally have no clue about what the issue is, and cannot reproduce with kde compiled (two days ago), from trunk, and not very different with that respect to 4.6RC. 

(might actually be a Kubuntu problem).
Comment 11 Hugo Pereira Da Costa 2011-01-06 17:34:00 UTC
For the record:
For those having the issue, what's the result of 

ls $HOME/.gtkrc*

and what's the content of the corresponding files ? (post as attachment).
Comment 12 Hugo Pereira Da Costa 2011-01-06 17:34:56 UTC
and what happens if one simply copies the content of the disapearing file .gtkrc-2.0-kde4 to .gtkrc-2.0 ?
Comment 13 Jonathan Thomas 2011-01-06 17:44:52 UTC
This is not related to oxygen-gtk, but it's also not related to kcm-gtk.

I think one of our packagers accidentally backported part of our QtCurve->Oxygen GTK migration script that we put in startkde from the development version of Kubuntu to the Kubuntu 10.10 packages. I'll notify the packagers so that they can fix this.
Comment 14 Benni Hill 2011-01-08 13:37:52 UTC
Seems fixed here on Kubuntu 10.10 with KDE SC 4.6 RC2.
Comment 15 Japs 2011-05-06 01:32:01 UTC
Sorry to reopen discussion after a few months. I have this bug on Debian testing with KDE 4.6.2.

A workaround is to save the path of the gtk theme engine in .gtkrc-2.0, as opposed to .gtkrc-2.0-kde where the system settings module saves it.
This allows to see gtk applications with the correct kde style applied.

Please possibly double check that the problem is only on the Debian/Ubuntu side of things and that things are written in the correct file.
Comment 16 Christoph Feck 2011-05-06 01:55:02 UTC
> in .gtkrc-2.0, as opposed to .gtkrc-2.0-kde where the system settings module saves it.

I just checked the source code of krdb. It writes to "gtkrc-2.0", not "gtkrc-2.0-kde". If on your system it writes to "gtkrc-2.0-kde", then either your version is patched in Debian, or you have set it in $GTK2_RC_FILES environment variable.