Tuesday 8 May 2018

How to add new wallpapers in GNOME

As we all know, Canonical has decided to throw away its signature desktop, and to adopt GNOME. Maybe they were tired, maybe they could no longer afford to develope and maintain Unity; it doesn’t really matter why: for the current Long Term Support version of Ubuntu uses the GNOME desktop. “An easy and elegant way to use your computer, GNOME 3 is designed to put you in control and get things done”, say its developers. They really do.

Today we’ll consider a complicated task, one which is but rarely attempted by users who don’t do computers as their day job, namely adding several wallpapers, so that they appear in the Background selection list alongside those which came preinstalled. How hard could this be?

Lesser desktop environments, such as the late lamented Unity, or even the inimical Windows 10, have this complicated feature, where any picture on the hard disk can be selected and used as desktop wallpaper. But GNOME is an advanced desktop, “an easy and elegant way to use the computer”.

The official way

The official way to add a bunch of pictures to the list of wallpapers from which the user can choose is to create an XML file listing them. The name of the file doesn’t matter; but it must be placed in one of three directories:
  • /usr/share/gnome-background-properties/
  • /usr/local/share/gnome-background-properties/
  • ~/.local/share/gnome-background-properties/
The file must have the following syntax, or schema:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
  <wallpaper>
    <name>Human Readable Name (Never Shown by GNOME)</name>
    <filename>/full/absolute/path/to/the/picture/filename.ext</filename>
    <options>zoom</options>
    <pcolor>#000000</pcolor>
    <scolor>#000000</scolor>
    <shade_type>solid</shade_type>
  </wallpaper>
  ·
  ·
  ·
</wallpapers>

The unofficial way

For those users who feel that the official GNOME “easy and elegant way” to add some wallpapers to the default list is a bit too enterprisey, the curious and enterprising people at OMG! Ubuntu! have found an unofficial but much simpler solution:
  1. Create a directory named ~/.cache/gnome-control-center/backgrounds.
  2. Copy your wallpapers in there.
That’s it. However, this is not the official way, and stuff may happen to data stored in a subtree named .cache. Caveat utens.

Desert

For desert, here are five abstract wallpapers which anybody can use as wallpapers. Four of them are almost monochrome pixellations, and the fifth is a nice smooth gradient in Ubuntian colors; the difference between the last two pictures is simply that one is rendered at 3440×1440 and the other at 2880×1200.
 
 
 
(Pictures available on Flickr under the Creative Commons Attribution license.)

No comments:

Post a Comment