Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I've recently upgraded from Precise to Raring and noticed that Nautilus 3.6, when displaying files and folders in list mode, no longer has alternating grey lines (there's probably a better name for these, but I don't know it; see pictures below). This used to be the default, and helped me to easily distinguish between particular files and their attributes.

Is there a way to reenable this? Is it maybe theme dependent?

The old list view with clearly demarcated lines: The old list view with clearly demarcated lines:

The new, unclear list view: The new, unclear list view

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The alternate row styling is simply commented out in the Ubuntu default themes.

Editing the theme file

Look for the /gtk-3.0/gtk-widgets.css file within your favorite theme.

  • Custom themes that you installed should be located in ~/.themes (the home folder)
  • The default Ubuntu themes are located in /usr/share/themes/.

Ubuntu 14.04 (Nautilus, Nemo)

Edit the gtk-widgets.css file in your theme folder. So with the Ubuntu default theme for example, that would be /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css. Find the following css rule around line ~2224, and add your chosen background color:

view row:nth-child(even){
  /*background-color: @base_color;*/
  background-color: #ECF2FD;  /* <-- add this  */

Ubuntu 13.04

For example, if you are using Ambiance then the file to edit is located at /usr/share/themes/Ambiance/gtk-3.0/gtk-widgets.css.

Uncomment the rules at approx. line 2181, from:

GtkTreeView row:nth-child(odd) {
  /*background-color: shade (@base_color, 0.965);*/


GtkTreeView row:nth-child(odd) {
  background-color: shade (@base_color, 0.965);

Or use a #RRGGBB colour, the classic OS X light blue colour for example:

GtkTreeView row:nth-child(odd) {
  background-color: #ECF2FD;

Editing those rules will work for Nautilus 3.6, as well as Nemo. Nemo, by default, will not show alternating row styles as it will be using the Ubuntu themes.

Note that after editing the file you may have to close and reopen the file browser. If it doesn't work, try relogging. The themes appear to be cached so even if you switch themes with Ubuntu-tweak, it may not display the change immediately.

Using an alternative theme

If you prefer to avoid editing the files you can use an alternative theme. A really nice one is MediterraneanNight Series ("White" and "Night" are the closest to the light/dark themes).

Here's an example with MediterraneanNight White:

MediterraneanWhite Night theme

share|improve this answer
Glad to find out it's theme dependent (and all the themes I had did this). Thanks! –  Aibara Iduas Apr 28 '13 at 16:25
I think this doesn't work in 14.04. Do you know a fix? –  Joschua Sep 16 '14 at 16:31
@Joschua Hya, sorry I'm late to the party. Installed 14.04, and updated the instructions above to add alternating background colors to Nautilus / Nemo. –  faB Sep 15 at 22:38
@faB Thank you! –  Joschua Sep 16 at 11:59

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.