22

As the question goes, How can I change the background of nautilus in Ubuntu 14.04 ??

I have already tried dconf-editor, gtk-tweaker, gnome-tweaker. They change the color of some parts of some pannel but not the background of nautilus in icons view.

1
  • As far I know the dconf method does no longer work as of version 3.8 :(
    – Rinzwind
    May 14, 2014 at 17:44

4 Answers 4

19

You can edit the gtk-main.css or nautilus.css files.

I recommend you to try this under your ~/.themes and not system-wide. You may either change the background color of nautilus only or the base theme as a whole, which affects a lot more programs. In this example I will change the background color in the default Ubuntu Theme "Ambiance" (in Ubuntu Gnome use the folder Default instead) from white (#ffffff) to a light grey (#D8D8D8). Feel free to pick any other color.

For comparison how it looks like in the beginning: Natuilus css file

Create a copy in ~/

Create your ~/.themes directory and copy the original Ambiance theme to it.

mkdir ~/.themes
cp -R /usr/share/themes/Ambiance ~/.themes/

Change the background color for the whole theme

If you want to change the base color for the whole theme, edit the base_color (Hex notation #??????) in gtk-main.css. This changes the background color of other applications (eg: gedit) as well.

nano ~/.themes/Ambiance/gtk-3.0/gtk-main.css

Change this line:

@define-color base_color #ffffff;

For this one:

@define-color base_color #D8D8D8;

To save the changes in nano, press Ctrl+O,Enter then Ctrl+X.

Effect: Background color for the whole theme

Change the background color for nautlius only

If you want to change the background color for nautilus, edit nautilus.css.

nano ~/.themes/Ambiance/gtk-3.0/apps/nautilus.css

Add this lines to the beginning of the file.

 NautilusWindow * .view {
     background-color: #D8D8D8; 
}

Natuilus css file

To save the changes in nano, press Ctrl+O,Enter then Ctrl+X.

Effect

Background color for nautilus only

To see the changes you can restart nautilus, logout login or restart your machine.

5
  • Is there a reference to which I can refer to for further change in theme? (specially nautilus) for example how can I change color of icon text, or the color of the icon when selected, etc.? May 15, 2014 at 5:38
  • @VahidNateghi: Not exaclty a list, but you can view the structure of the default themes in ubuntu (Ambiance), and here you have a link to a basic gtk3 theming guide worldofgnome.org/making-gtk3-themes-part-1-basics and this link is for gnome developer for GtkCssProvider (selector, widget classes) developer.gnome.org/gtk3/3.4/GtkCssProvider.html .hope this helps. May 15, 2014 at 15:45
  • @VahidNateghi I was able to successfully change the color of the icon text by adding color: #FFF; to the above styles
    – Caleb
    Apr 13, 2016 at 21:13
  • In 16.04 the file has been moved to /usr/share/themes/Ambiance/gtk-3.0/gtk-main.css.
    – MERose
    Jan 21, 2017 at 15:07
  • What about changing the color of the side panel? Feb 15, 2018 at 22:30
7

Roman's solution will work, but actually there's no need to copy the entire Ambiance theme to your .themes directory. Instead, you can simply create a file ~/.config/gtk-3.0/gtk.css and put any changes you want there, such as

NautilusWindow * .view {
 background-color: #D8D8D8; 
}

Then restart Nautilus. The definition in your gtk.css file will override the theme defaults and you'll see the background color you wanted.

2
  • Is there somewhere where I can see how to change the other parameters? Some kind of list where I could try playing with the hexa-decimal colors? I managed to do your solution but I want to learn how to change the rest of the colors, not just the background one. +1 Dec 20, 2016 at 16:44
  • What about changing the color of the side panel as well? Feb 15, 2018 at 21:33
3

Just change the system appearance to dark:

System -> Appearance -> Dark

Nautilus will inherit the color scheme.

1
  • This is the simplest solution and should be the selected answer. Aug 21, 2021 at 14:06
0

The best way to change colours is to install a theme.

So first install Unity Tweak Tool.

Then create a ~/.themes folder

Then find and download your preferred theme. This is an example. Unzip the themes in the folder created.

Open Unity Tweak Tool and under themes choose the one just installed.

2
  • Hmm those do not change the nautilus background.
    – Rinzwind
    May 14, 2014 at 17:43
  • Some themes do change the Nautilus background. I'm using one that does.
    – To Do
    May 15, 2014 at 8:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .