Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Before, one could configure certain options in Gnome 2.x through the ~/.gtkrc-2.0 file. With Gnome 3, one would assume that ~/.gtkrc-3.0 works but it doesn't.

share|improve this question
    
which OS version you are using –  Ghost Answer Apr 25 '12 at 7:32
    
I am using Ubuntu 12.04 amd64 –  Wolter Hellmund Apr 30 '12 at 15:54

1 Answer 1

up vote 3 down vote accepted

gtk 3.0 / Gnome 3 settings can be overwritten using ~/.config/gtk-3.0/, with files gtk.css and settings.ini. They do not exist initially so you have to create the directory and files manually. If you create settings.ini add at least a line containing [Settings] in it, otherwise apps will complain about it missing.

See /usr/share/theme/[theme_name]/gtk-3.0/*.css files for hints of what you can change.

Most likely you will want to use gtk.css to override visual settings from the desktop theme with your own preferences. I usually don't edit gtk.css itself but rather append a line saying @import url("gtk-mine.css"); and put my stuff in gtk-mine.css. This way, in case someone ever overwrites that file, I only lose the @import line, not all my personal rules.

Here's a short example of how to override some scrollbar attributes:

~/.config/gtk-3.0/gtk-css:

@import url("gtk-mine.css");

~/.config/gtk-3.0/gtk-mine.css:

* {
  -GtkRange-slider-width: 18;
  -GtkScrollbar-has-forward-stepper: 0;
  -GtkScrollbar-has-backward-stepper: 0;
  -GtkScrollbar-has-secondary-forward-stepper: 0;
  -GtkScrollbar-has-secondary-backward-stepper: 0;
  -GtkScrollbar-min-slider-length: 30;
}
.scrollbar.slider.vertical,
.scrollbar.button.vertical {
  border-radius: 4;
}
share|improve this answer
    
Seeing your post, I think its great that Gnome 3 uses CSS for style. Thanks for your answer! I initially wondered about this because I wanted to change icon sizes, but I guess there is some option somewhere on the CSS files for doing that. –  Wolter Hellmund Jul 9 '12 at 1:52
    
Thanks, helpful. btw, /usr/share/theme/ should be /usr/share/themes/ –  djb Aug 12 at 12:31

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.