Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to have the nautilus background color different if the current folder is being managed by git (i.e., if there is a .git directory in it). Any ideas how to do that? Ideal solution would work for all nautilus views (list view & compact view, not just icon view). I've looked at "gnome color chooser" and at the "window rules" module of ccsm, to no avail. I'm running 10.04, gnome2, ccsm.

share|improve this question
In the absence of an answer that does what I'm asking, I would also accept an answer saying "here's how to do it in [unity, mint/cinnamon,etc]." – drammock Feb 8 '13 at 4:44

Note: These steps won't work for GTK-2.0, which I think Ubuntu 10.04 uses.

Here is how to change the background color of nautilus in general (for GTK-3.0):

  1. Find the location of your theme. For me it was /usr/share/themes/Ambiance
  2. It is better to copy this folder in ~/.themes and then make changes to it, rather than making changes in the original location.
  3. Look for gtk-3.0/apps/nautilus.css in the Ambiance folder.
  4. Add these lines at the top of the file:

    NautilusWindow * {background-color: gray;}

  5. Restart nautilus, using nautilus -q command to quit nautilus.

  6. You will notice that the background color of browser area changes to gray.

Coming back to your original question, I don't think it's possible to theme nautilus based on location because, changing theme requires nautilus to be restarted. (If you are OK with restarting of nautilus, I guess then someone can write a script which can play with css, based on current browser location. But again, I'm not too sure of that.)

share|improve this answer
+1: useful information, but not a solution unfortunately. – drammock Feb 19 '13 at 22:49

Your Answer


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.