Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 330509 - kde-base/systemsettings-4.5.4: wrong kde4 setting for GTK2_RC_FILES with a multilib gtk+
Summary: kde-base/systemsettings-4.5.4: wrong kde4 setting for GTK2_RC_FILES with a mu...
Status: RESOLVED DUPLICATE of bug 288549
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 14:16 UTC by Fabio Rossi
Modified: 2011-10-31 10:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
bad-rendering.png (bad-rendering.png,18.28 KB, image/png)
2011-01-05 00:31 UTC, Fabio Rossi
Details
good-rendering.png (good-rendering.png,18.06 KB, image/png)
2011-01-05 00:31 UTC, Fabio Rossi
Details
systemsettings-gtkrc-multilib.patch (systemsettings-gtkrc-multilib.patch,536 bytes, patch)
2011-01-05 00:35 UTC, Fabio Rossi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio Rossi 2010-07-30 14:16:12 UTC
By default KDE4 sets the GTK2_RC_FILES to

  /etc/gtk-2.0/gtkrc:$HOME/.gtkrc-2.0::$HOME/.kde4/share/config/gtkrc-2.0

in the function applyGtkStyles() inside krdb.cpp (kde-base/systemsettings).

When using a multilib profile the system config dirs for gtk+ are something like /etc/gtk-2.0/${CHOST} so the system settings are not considered.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2010-12-30 08:54:18 UTC
Please explain more... which KDE version? Which part of KDE are you talking about? We are not GTK experts, so please explain what is happening!
Comment 2 Fabio Rossi 2011-01-05 00:30:30 UTC
I'm currently using KDE-4.5.4 + some GTK applications but the problem doesn't depend on the KDE version. I'm not a GTK expert too. In particular, I have found a problem using a GTK application, pavucontrol, which fails to find some icons (see attachments below). I'll describe what I found for the specific application but I think the problem is more general.

The current GTK theme configured by gtk-chtheme is Raleigh which is included in the default installation. The KDE theme is Oxygen.

pavucontrol doesn't render correctly (bad-rendering.png) because it can't find some icons. Looking at the pavucontrol source code the three needed icons on the right are:
- audio-volume-muted
- stock_lock
- emblem-default
All the icons are available in the path /usr/share/icons/gnome/ but, using the default configuration, the second and third icons are not loaded. The first icon is displayed becuase is present also in the Oxygen theme. Here are the files in my system:

$ locate audio-volume-muted.png
/usr/share/icons/gnome/*/status/audio-volume-muted.png
/usr/share/icons/oxygen/*/status/audio-volume-muted.png
$ locate stock_lock
/usr/share/icons/gnome/*/status/stock_lock-broken.png
$ locate emblem-default
/usr/share/icons/gnome/*/emblems/emblem-default.png

The problem is given by the fact that the application doesn't look into the
/usr/share/icons/gnome/ path. This is strange because the default gtkrc config file, regularly installed with gtk+2.0 (/etc/gtk-2.0/x86_64-pc-linux-gnu/gtkrc),
contains the directive
  gtk-fallback-icon-theme = gnome
So it seems the file is not read during the init of pavucontrol.

GTK+ uses the GTK2_RC_FILES variable to discover the location of the config
files. The variable should be set automatically by KDE but is not correctly set on a multilib system (the right system path should be /etc/gtk-2.0/${CHOST}/ instead of /etc/gtk-2.0/).

If I launch pavucontrol with

$ GTK2_RC_FILES="/etc/gtk-2.0/x86_64-pc-linux-gnu/gtkrc:$GTK2_RC_FILES" pavucontrol

then I got the correct behaviour (snapshot good-rendering.png)
Comment 3 Fabio Rossi 2011-01-05 00:31:30 UTC
Created attachment 258873 [details]
bad-rendering.png
Comment 4 Fabio Rossi 2011-01-05 00:31:49 UTC
Created attachment 258875 [details]
good-rendering.png
Comment 5 Fabio Rossi 2011-01-05 00:35:16 UTC
Created attachment 258877 [details, diff]
systemsettings-gtkrc-multilib.patch

This is a simple proof of concept patch to =kde-base/systemsettings-4.5.4 to build correctly the GTK2_RC_FILES variable. The patch is just a demonstration, it misses autodetection of the $CHOST.
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2011-10-30 15:26:35 UTC
Is this still a problem with kde 4.7.2?
Comment 7 Fabio Rossi 2011-10-31 10:29:37 UTC
The problem is now fixed in >=gtk+-2.24.0 and I'll close this bug as a dupe of #288549.
Comment 8 Fabio Rossi 2011-10-31 10:30:07 UTC

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