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

1 Answer 1


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

  • Glad to find out it's theme dependent (and all the themes I had did this). Thanks!
    – Fern Moss
    Apr 28, 2013 at 16:25
  • I think this doesn't work in 14.04. Do you know a fix?
    – Joschua
    Sep 16, 2014 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. Sep 15, 2015 at 22:38
  • 2
    @faB Sorry to bother you again, but do you know how to make this work again in Ubuntu 15.10? It seems they have changed sth. again. Now I can't get it to work with any of the solutions.
    – Joschua
    Nov 10, 2015 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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