Gnome using KDE dialogs

I have OpenSuse 13.1 with both GNOME and KDE installed but now when using GNOME applications use KDE icons and dialogs like the Open File correspond to KDE instead of GNOME.

This just happened after a software update but I do not know which settings where changed in GNOME.

How can I change this behaviour back? I have already tried to find any related setting in gnome-control-center and gnome-tweak-tool with no luck.

Thanks!

Is this when you run them in GNOME or in KDE?

Normally they use KDE’s settings when run in KDE, and GNOME’s settings when run in GNOME.
You can change KDE’s settings in “Configure Desktop”/“Systemsettings”->“Application Appearance”->“GTK”.
Uninstall “kde-gtk-config” to disable that completely.

But GNOME application should NEVER use KDE’s file dialog, not even when run inside KDE (Gtk doesn’t adapt to the Desktop Environment like Qt does f.e.). It should be just GNOME’s dialog using the KDE style settings.
Please post a screenshot to be sure.

wolfi323, it is when I run GNOME and you are right it seems GNOME’s dialog is using the KDE style settings (as well as the menu bar of the applications).

Here is a screenshot:

http://tinyurl.com/pl6zjav

Yes, that’s indeed GNOME’s file open dialog.

So apparently GNOME applications use KDE’s oxygen theme even when running in GNOME.
Well, you can change GNOME’s theme in gnome-tweak-tool (“Appearance”).

What settings do you have there? Does it have any effect when you change them?
(the default would be “Adwaita” for each of them except “Icons”, which should be “GNOME”)

If that doesn’t have effect, try to remove ~/.config/gtk-3.0/.

I already tried gnome-tweak-tool but with no success.

It already had all values set to the default Adwaita theme:

http://tinyurl.com/pl64twd

When changing the values it affect only certain parts of the windows but the menus and the dialogs remain unchanged.

I will try now the trick of removing ~/.config/gtk-3.0/

Indeed ~/.config/gtk-3.0/settings.ini is referring to oxygen-gtk:

[Settings]
gtk-font-name=Sans Serif 9
gtk-theme-name=oxygen-gtk
gtk-icon-theme-name=oxygen
gtk-fallback-icon-theme=gnome
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-menu-images=1
gtk-button-images=1
gtk-application-prefer-dark-theme=0

I have removed the directory and restarted my gnome session but it is still using oxygen theme.

Actually removing the gtk-3.0 directory had some effect but not in all applications:

  • gnome-terminal is now using the adwaita theme
  • firefox and thunderbird are still using oxygen

Yes, that’s created when you login to KDE according to KDE’s GTK settings, and then environment variables are set that GTK3 applications use that.

But it should have no influence when you are logged into GNOME.

I normally only use KDE, but I just tried logging into GNOME, and here all applications use the Adwaita theme, not Oxygen, despite having that ~/.config/gtk-3.0/settings.ini with oxygen-gtk.

Actually removing the gtk-3.0 directory had some effect but not in all applications:

  • gnome-terminal is now using the adwaita theme
  • firefox and thunderbird are still using oxygen

Well, Firefox and Thunderbird are no GNOME applications.
They do use Gtk, but Gtk2, so removing ~/.config/gtk-3.0/ has of course no effect.

For those remove ~/.gtkrc-2.0 and ~/.gtkrc-2.0-kde4 (not sure if the latter one has to be removed).

I have no idea, how to set the Gtk2 them in GNOME3, but you could change it in KDE’s settings I suppose.

Removing ~/.gtkrc-2.0 solved the issue with thunderbird and firefox.

Now everything is using the adwaita theme and I have learned quite a lot about how the settings work behind the scenes.

Thanks a lot!

Yes, but this will also be recreated when you log into KDE next time.
To prevent that, uninstall kde-gtk-config as already mentioned, or set a different Gtk2 theme in KDE’s GTK settings.

Actually I can reproduce the issue here with Firefox.
I guess the problem is that GNOME offers no way to set the Gtk2 theme, so KDE’s Gtk2 settings are used if they are found.

Now that I know the two files generated in KDE that caused the problem in GNOME, I can just delete them if I log to GNOME after using KDE. This way KDE will look better.

Thanks to your help I have also understood how I could be affected by an issue with save functionality of libreoffice that is related to using oxygen-gtk but, until now, I could not understand how it could affect me in GNOME :wink:

https://forums.opensuse.org/showthread.php/496171-Libreoffice-save-crash

You could create a script that deletes it automatically when logging out of KDE.
But then the system won’t remember the settings you make in KDE’s GTK configuration, they will be reset to the default when you logout/in.

Thanks to your help I have also understood how I could be affected by an issue with save functionality of libreoffice that is related to using oxygen-gtk but, until now, I could not understand how it could affect me in GNOME :wink:

https://forums.opensuse.org/showthread.php/496171-Libreoffice-save-crash

Well, yes, as I wrote in the other thread, libreoffice uses GTK2 when using the GNOME integration, so it is of course affected by the GTK2 theme settings.
But that crash with the gtk2-theme-oxygen should be fixed already.