2

I would like to change the background color of the 'explorer' window in Nautilus on Ubuntu 18.04. I am using the Ambience theme and am very happy with the look.

I simply want to make the white background a slightly darker color. The answer(s) as provided for Ubuntu 14.04 does not work for me.

I have tried to edit the following files and locations in a variety of ways with no effect at all:

.config/gtk-3.0/gtk.css
.config/gtk-3.20/gtk.css
.config/gtk-4.0/gtk.css
/usr/share/themes/Ambiance/gtk-3.0/gtk-main.css
/usr/share/themes/Ambiance/gtk-3.20/gtk-main.css
/usr/share/themes/Ambiance/gtk-3.0/apps/nautilus.css
/usr/share/themes/Ambiance/gtk-3.20/apps/nautilus.css

After each change I would close all open Nautilus files and then open an 'explorer' window. I would also run killall nautilus at times to be sure before I open a new window....

What file do I need to edit so that I could change the background color?

Thanks

1 Answers1

3

it should be eaiser to acheive with ~/.config/gtk-3.0/gtk.css but in my trail it is also changing and locking the desktop background.

So below is the workaround.

create the file gtk.css with below content

@import url("/usr/share/themes/Ambiance/gtk-3.20/gtk.css");
.nautilus-window { background-color: yellow; }

place this gtk.css file in the blow path.. create the directory's as necessary..
~/.themes/YELLOW/gtk-3.0/

choose this Application theme called YELLOW from gnome-tweaks or via command line..

enter image description here

logout and logback in may be necessary..

enter image description here

Edited Code:

@import url("/usr/share/themes/Ambiance/gtk-3.20/gtk.css");

.nautilus-window { background-color: yellow; }
.nautilus-window .view { background-color: purple; }

enter image description here

PRATAP
  • 22,460
  • Thank you for the suggestion @PRATAP. When I select the YELLOW theme in my tweaks GUI, and my Files view is set to folder view, it works! If I set the Files view to "details" a very thin yellow line is presented between the dark dropdown section of the window and the actual folders. My Files (version 3.26.4) background is still white. I suspect I have to change the color of a different variable as well, any ideas? – v1talogy Feb 21 '20 at 06:53
  • 1
    Hi, see the edited code in the answer.. – PRATAP Feb 21 '20 at 07:39