What is the default GTK 3 Theme Engine in Ubuntu Unity?

I was trying to install ubuntu-desktop package in Ubuntu-Gnome(gnome shell). Using unity-tweak I set theme as Ambiance. But only gtk2 applications are looking good. All gtk3 application has ugly border(header bar) and background(sometimes). I have attached a screenshot.

What is the default gtk3-theme-engine in Ubuntu unity?

enter image description here

Edit

if I run gtk3 application with root permission then theme is okay. I also created a new user but result is same. enter image description here


Solution 1:

I don't think the gtk3-theme-engine is the one you are looking for. Anyway this is on fresh installed Ubuntu 14.04 machine:

$ locate theming-engines
/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/theming-engines
/usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/theming-engines/libunico.so

$ dpkg -S /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/theming-engines/libunico.so
gtk3-engines-unico:amd64: /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/theming-engines/libunico.so

$ apt-cache rdepends gtk3-engines-unico
gtk3-engines-unico
Reverse Depends:
  light-themes
  libgtk-3-0

References:

  • Gnome Developer: Theming changes for paths
  • Ubuntu Wiki: Theming - Decorations Switch to Gtk3 theming

It seems to me, a configuration problem.

  • Check the environment variables by runing env look for GTK_THEME, GTK_RC_FILES, GTK_CSD.

    env | grep -i gtk
    
  • Look if you have gtkrc in your home folder

    sudo find ~/ -iname gtkrc
    

GTK_THEME force Gtk3 application to use custom themes folder.

GTK_RC_FILES can change some Gtk3 theme settings/properties.

GTK_CSD tells Gtk3 to use Wayland Client Side Decoration, and default for Gtk3 application is to use the new header bar.

Well it was found by shantanu (OP):

WOW, I found the culprit. export GTK_CSD=1 was in /etc/profile. And this variable was forcing gtk3 application to use CSD header.

Solution 2:

My best guess is that the version of the Ambiance theme that is available is not fully compatible with the version of GTK+ that we ship.

It would probably be a lot easier for you and provide a better experience to use Ubuntu vanilla than to try to install Unity in elementary OS.

Solution 3:

I have got a partial solution. Using gtk3-nocsd, we can disable client side decoration. For Unity, we have to use this for an application separately. You cannot set it in environment. (i.e To fix gnome-terminal, edit /usr/share/applications/gnome-terminal.desktop and modify Exec= line as following)

EXEC=env LD_PRELOAD=/usr/lib/gtk3-nocsd/gtk3-nocsd.so gnome-terminal

How to install gtk3-nocsd:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install gtk3-nocsd