[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 257331] New: Suboptimal handling of GTK2_RC_FILES in krdb
From:       Robby Workman <rw () rlworkman ! net>
Date:       2010-11-19 15:06:52
Message-ID: bug-257331-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=257331

           Summary: Suboptimal handling of GTK2_RC_FILES in krdb
           Product: systemsettings
           Version: unspecified
          Platform: Slackware Packages
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: krdb
        AssignedTo: kdelibs-bugs@kde.org
        ReportedBy: rw@rlworkman.net


Version:           unspecified (using KDE 4.5.3) 
OS:                Linux

We had a (confirmed) report that some qt apps, specifically VLC, did not work
correctly when run in a non-qt/kde environment.  I don't recall details off
the top of my head, but the conclusion reached was that the app in question
did not know how to find the gtk theme when being run outside of KDE, and 
the solution was to populate GTK2_RC_FILES in the environment before starting
the X session if we're not running KDE.  [1]

We added a profile script that does this:
 
GTK2_RC_FILES="/etc/gtk-2.0/x86_64-slackware-linux/gtkrc:/etc/gtk-2.0/gtkrc:$HOME/.gtkrc-2.0"

As expected, this solves the VLC issue, but it introduces a new problem.
Before we added that profile script, GTK apps that were launched from 
within KDE would have a theme matching the current QT theme; however,
after adding the profile script, they always match the theme defined *last*
in GTK2_RC_FILES.

That seems easy enough to work around, right?  We can just add the
path that KDE uses to write its gtkrc file, which is
$HOME/.kde/share/config/gtkrc-2.0, as defined in krdb.cpp.

Of course, now we have created *another* problem.  If a user logs into KDE,
she will have $HOME/.kde/share/config/gtkrc-2.0 created to match her QT
theme selected, and then when she logs out of KDE and returns to her old
favorite DE, which happens to be XFCE, she gets a surprise -- all of her
apps will be using the QT-looking theme since GTK2_RC_FILES contains the
$HOME/.kde/share/config/gtkrc-2.0 patch in it.

Soo...  how to solve this?  It seems to me that krdb should read in the
value of GTK2_RC_FILES and then append $HOME/.kde/share/config/gtkrc-2.0 
to it (and then use that as expected).  This would IMHO be the best way
to handle it, but there is at least one other option: we (Slackware) can
patch /usr/bin/startkde to append $HOME/.kde/share/config/gtkrc-2.0 to
GTK2_RC_FILES.

Thoughts?

[1] What part of KDE *populates* GTK2_RC_FILES if it's currently empty
    when KDE starts?  Unless I missed something obvious, it doesn't 
    seem to be happening in krdb.cpp, yet *something* is populating it:
    if we don't set it in the environment already before launching KDE,
    then we can see in the output of "env" that it is set and contains
    $HOME/.kde/share/config/gtkrc-2.0 in it... :/


Reproducible: Always

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic