9

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

shantanu
  • 8,835

4 Answers4

4

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:

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.

user.dz
  • 49,176
3

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.

2

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
user.dz
  • 49,176
shantanu
  • 8,835
0

If you want to use GTK, first change your display manager. Perform following operations.

sudo apt-get install gdm
sudo dpkg-reconfigure lightdm

You will get a screen like this...enter image description here

choose "gdm" using your cursor and then press enter.

Then you can restart the machine (optional), or just log out and login to "gnome-shell"

Therafter you can use "tweak-tool"

sudo apt-get install gnome-tweak-tool

Open the tweak-tool. Here you can choose whatever theme you may like, but make sure "Window" & "GTK+" has the same theme, else you will get the issue as you mentioned, that the window headers will be different.

I personally like Vertex theme. Try it out.. its quite brilliant,especially the dark one. enter image description here

roneo
  • 109