Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I noticed that some applications use the Adwaita Dark theme, while others use the light one. Is there a way to make all applications use the Dark one?

share|improve this question
1  
Adding screenshots or at least mentioning what applications are having this issue, would be helpful. –  Martín Canaval Feb 1 '13 at 18:35
    
According to gnome-session --version, I have Gnome 3.4.2.1, but as I use OpenBox as WM (are you using Metacity?), instead of the solution below, I use obconf to change theme (and set other preferences). –  Emanuel Berg Feb 1 '13 at 20:37

2 Answers 2

up vote 14 down vote accepted

Replacing the main theme with the dark one in /usr/share/themes is not an ideal solution as each time gnome-themes is updated your theme will revert to default. It's preferable to properly configure your user account to use the dark theme, that way your settings will be preserved between updates. You can do that:

  • Manually: create (open if already present) the following file:

    ~/.config/gtk-3.0/settings.ini

    edit like this:

    [Settings]
    gtk-application-prefer-dark-theme=1


  • Via gnome-tweak-tool (which essentially does the same thing as above, writing the same file):

    GNOME3 dark theme mode switch in gnome-tweak-tool


GTK2 Problem

This answer is indeed the ideal and "safe" (i.e no need to replace/mod any system files) method. However, currently neither this method nor Jeff's answer works for all apps. Coz only GNOME3/GTK3 has support for the dark theme mode. As of now, there are still many apps (for example those written in GNOME2/GTK2, Qt, wxWidgets, Java, etc) which don't use GTK3 and remain on the old GTK2 theming. To make those apps dark, replacing/modding the GTK2 part($ACTIVE_THEME/gtk-2.0/gtkrc) of the currently active theme works. To know more, see the answer to "Firefox not affected by gtk theme".

As GTK2 is deprecated and superseded by GTK3, all actively developed GTK2 apps are getting ported to or replaced by GTK3. Sooner or later, other toolkits like Qt, wxWidgets, etc may also implement support for GTK3. By that time, this method may become valid for all(maybe almost all) apps.

share|improve this answer
    
I haven't tested this, so I'm giving you the benefit of the doubt :) This does seem neater. –  Jeff Apr 5 '13 at 0:53
    
My version of gnome-tweak-tool (updated AFAIK) doesn't have this option. Manually adding that file works fine after reboot. –  Jeff Jun 14 '13 at 0:40
2  
This does not work for all applications, e.g. Firefox. I'm going to try this now: askubuntu.com/questions/337018/… –  Rasmus Nov 1 '13 at 1:14

Simply replace the main theme with the dark one (make a backup first):

cd /usr/share/themes/Adwaita/gtk-3.0
sudo mv gtk.css gtk.css.bak
sudo cp gtk-dark.css gtk.css

then restart the computer.

share|improve this answer
    
Although it work, after an update it could be revert to the default. –  Rubens Mariuzzo Nov 11 '13 at 22:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.