Firefox launched from alt-f2 doesn't apply all gtk2-qt-engine settings

Bug #94615 reported by Jakub Turski
4
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Fix Released
Medium
Anthony Mercatante

Bug Description

Binary package hint: kdesktop

Greetings,

Symptoms:
System settings -> Appearance -> GTK Styles and fonts:
GTK Style: Use my KDE style in GTK applications

Now, launch Firefox from Konsole - Firefox launches, gtk looks good - just like qt. Close Firefox.
Press alt-f2, enter 'firefox', press enter - Firefox launches, looks good. Close Firefox.
Press alt-f2, enter '/usr/bin/firefox', press enter - Firefox launches, colors are WRONG - settings from Appearance section regarding colors are not applied. Close Firefox.
Same thing happens (wrong colors) when you have '/usr/bin/firefox' defined as default browser, and you enter 'google.com' on alt-f2 dialog.

I straced both cases, grepping for 'gtkrc' phrase, and compared the files. Here's the difference: when launched from Konsole, Firefox parses ADDITIONAL gtkrc file, namely ~/.kde/share/config/gtkrc-2.0 - which holds colors definitions. It parses this file, because GTK2_RC_FILES environment option is set:
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/yacoob/.gtkrc-2.0:/home/yacoob/.kde/share/config/gtkrc-2.0

Now, my question is: why this variable is NOT set while I'm launching it as /usr/bin/firefox or via specyfing an url? It causes Firefox to appear looking different, depending on the way it was launched. I grepped through some of the files, looking for place where this could be set, but I wasn't able to find the place.

I hope you will be able to solve this one :)

Best regards,

KT.

Revision history for this message
Jakub Turski (yacoob) wrote :

Just a thing I noticed - GTK2_RC_FILES seems to be set up by Konsole itself - when I launch xterm, this variable is not set. So, in order to solve the bug this variable should be set globaly upon user login.

Revision history for this message
Fenix-TX (jesusvpct) wrote :

This happens in all gtk applications, if you use beryl and you open beryl-manager from alt+f2 you will have the same issue. Only gtk applications get the qt look and feel when you open them from kmenu.

Revision history for this message
Jakub Turski (yacoob) wrote :

Solved it for one user, by adding this variable via ~/.kde/env:

/home/yacoob/.kde/env/gtkrc.sh:

#!/bin/sh
export GTK_RC_FILES=/etc/gtk/gtkrc:/home/yacoob/.gtkrc:/home/yacoob/.kde/share/config/gtkrc
export GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/yacoob/.gtkrc-2.0:/home/yacoob/.kde/share/config/gtkrc-2.0

What would be a global fix?

KT.

Ryan Kavanagh (ryanakca)
Changed in kdebase:
assignee: nobody → ryanakca
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Ryan Kavanagh (ryanakca)
Changed in kdebase:
assignee: ryanakca → tonio
status: Confirmed → Fix Committed
Revision history for this message
Anthony Mercatante (tonio) wrote :

Latest kdebase upload should fix this, as GTK2_RC_FILES is now correctly initialized.
Please reopen the bug if the problem remains, but looks okay here.
The packages (0ubuntu17) sjould reach the repos soon.

Changed in kdebase:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.