You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Saturday, October 28th 2006, 5:03pm

Gtk Styles problem

It's a gtk application's look problem and I explane it with an example on firefox. When I click with mouse on desktop/menu item of firefox I've got the follow app
http://img133.imageshack.us/my.php?image=schermata1zu7.png
When I call firefox from user's shell, if there isn't another firefox's instance, I've gote the follow app
http://img143.imageshack.us/my.php?image=schermata2sc7.png
You can notice the different background color, with the same firefox theme and the same gtk theme! It'a a problem of ALL gtk apps. I also tried to change gtk thems (from Kde Control Center or gtk-chtheme or switch2; now I use GTK+2 Qt Theme Engine) but it's indipendent from any gtk themes. There's a way to make uniform the look independently from where I call the application?

thx

Cepheus

Beginner

Posts: 8

Location: Berlin, Germany

  • Send private message

2

Wednesday, November 15th 2006, 10:22pm

RE: Gtk Styles problem

Hi,

I noticed the same problem and checked the environment of a GTK app while is was running: GTK applications which are run from the K-Menu or Desktop know these two environment variables:

Source code

1
2
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:~/.gtkrc-2.0:~/.kde/share/config/gtkrc-2.0
GTK_RC_FILES=/etc/gtk/gtkrc:~/.gtkrc:~/.kde/share/config/gtkrc


When i export these two values in the shell before running a GTK app, then it works, the colors are correct. KDE saves the colors for GTK-apps in ~/.kde/share/config/gtkrc*. GTK apps don't know this path, but the environment variables tell them to use these files.

If you often run GTK applications via shell you can set the values in your ~/.bash_profile.

Greetings

cepheus


3

Tuesday, December 12th 2006, 1:17am

Thanks for those environment variables. I was having the same problem and now at least they work fine when launched from xterm.

However, gtk applications launched from KDE's taskbar still aren't having the proper colors applied. Is there another variable or something that could fix it?

edit: I figured out that this was happening because the original bash that KDE was running on (tty1) didn't have my updated ~/.profiles. I simply logged out, logged back in and started KDE.

This post has been edited 1 times, last edit by "chmod" (Dec 12th 2006, 3:01am)