10.5. Customizing Desktop Backgrounds
dconf utility, you can configure the default background, add extra backgrounds, or add multiple backgrounds.
10.5.1. Customizing the Default Desktop Background
org.gnome.desktop.background schema.
Procedure 10.10. Setting the Default Background
- Create a
localdatabase for machine-wide settings in/etc/dconf/db/local.d/00-background:# Specify the dconf path [org/gnome/desktop/background] # Specify the path to the desktop background image file picture-uri='file:///usr/local/share/backgrounds/wallpaper.jpg' # Specify one of the rendering options for the background image: # 'none', 'wallpaper', 'centered', 'scaled', 'stretched', 'zoom', 'spanned' picture-options='scaled' # Specify the left or top color when drawing gradients or the solid color primary-color='000000' # Specify the right or bottom color when drawing gradients secondary-color='FFFFFF'
- Override the user's setting to prevent the user from changing it in
/etc/dconf/db/local.d/locks/background:# List the keys used to configure the desktop background /org/gnome/desktop/background/picture-uri /org/gnome/desktop/background/picture-options /org/gnome/desktop/background/primary-color /org/gnome/desktop/background/secondary-color
For more information, see Section 9.5.1, “Locking Down Specific Settings”. - Update the system databases:
#dconf update - Users must log out and back in again before the system-wide settings take effect.
10.5.2. Adding Extra Backgrounds
- Create a filename.xml file (there are no requirements for file names) specifying your extra background's appearance using the org.gnome.desktop.background schemas. Here is a list of the most frequently used schemas:
Table 10.1. org.gnome.desktop.background schemas GSettings Keys
Key Name Possible Values Description picture-options "none", "wallpaper", "centered", "scaled", "stretched", "zoom", "spanned" Determines how the image set by wallpaper_filename is rendered. color-shading-type "horizontal", "vertical", and "solid" How to shade the background color. primary-color default: #023c88 Left or Top color when drawing gradients, or the solid color. secondary-color default: #5789ca Right or Bottom color when drawing gradients, not used for solid color. The full range of options is to be found in thedconf-editorGUI orgsettingscommand-line utility. For more information, see Section 9.3, “Browsing GSettings Values for Desktop Applications”. - Store the filename.xml file in the
/usr/share/gnome-background-properties/directory.
Example 10.4. Extra Backgrounds File
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
<name>Company Background</name>
<name xml:lang="de">Firmenhintergrund</name>
<filename>/usr/local/share/backgrounds/company-wallpaper.jpg</filename>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#ffffff</pcolor>
<scolor>#000000</scolor>
</wallpaper>
</wallpapers>
<wallpaper> elements to add more backgrounds.
<wallpaper> elements, adding two different backgrounds:
Example 10.5. Extra Backgrounds File with Two Wallpaper Elements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
<name>Company Background</name>
<name xml:lang="de">Firmenhintergrund</name>
<filename>/usr/local/share/backgrounds/company-wallpaper.jpg</filename>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#ffffff</pcolor>
<scolor>#000000</scolor>
</wallpaper>
<wallpaper deleted="false">
<name>Company Background 2</name>
<name xml:lang="de">Firmenhintergrund 2</name>
<filename>/usr/local/share/backgrounds/company-wallpaper-2.jpg</filename>
<options>zoom</options>
<shade_type>solid</shade_type>
<pcolor>#ff0000</pcolor>
<scolor>#00ffff</scolor>
</wallpaper>
</wallpapers>
10.5.3. Setting the Screen Shield
org.gnome.desktop.screensaver.picture-uri GSettings key. Since GDM uses its own dconf profile, you can set the default background by changing the settings in that profile.
dconf, see Chapter 9, Configuring Desktop with GSettings and dconf.
Procedure 10.11. Adding a Logo to the Screen Shield
- Create a
gdmdatabase for machine-wide settings in/etc/dconf/db/gdm.d/01-screensaver:[org/gnome/desktop/screensaver] picture-uri='file:///opt/corp/background.jpg'
Replace /opt/corp/background.jpg with the path to the image file you want to use as the Screen Shield.Supported formats are PNG, JPG, JPEG, and TGA. The image will be scaled if necessary to fit the screen. - Update the system databases:
#dconf update - You must log out before the system-wide settings take effect.
10.5.3.1. What If the Screen Shield Does Not Update?
dconf update command as root to update the system databases.
GDM. For more information, see Section 14.1.1, “Restarting GDM”.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.