How do I theme the Nautilus background image?
- Open the file /usr/share/themes/MyTheme/gtk-3.0/apps/nautilus.css (Requires root permission).
-
Add this line:
NautilusWindow * {background-image:url("bg.jpg");}
where bg.jpg is the background image you want to display.
Run
nautilus -q
to kill all open file browsers.Run
nautilus
.
This will apply background to all classes present inside NautilusWindow.You can identify the classes where you don't want to apply background and add background-image:none;
Example:
NautilusWindow .sidebar,
NautilusFloatingBar,
NautilusWindow .sidebar .view {
background-image: none;
}
The part of the theme you want to alter is .view
, so in nautilus.css
include the following section:
NautilusWindow *.view {
background-color: @your_predefined_color_here;
}
From my own experimentation on 12.04.1 LTS, I've found that it is possible to define your own background-color
property in here with a hexadecimal RGB value, but you cannot set a background-image
using -gtk-gradient
.
Thus, you probably won't be able to set a background image, but you can at least change the color.
Note: if you don't want this to affect your sidebar, follow the last part of ignite's answer, but use background-color
instead of background-image
unless you also set that further down in your theme file.
I got the idea to theme .view
partially from this Arch Linux forums thread.