Ubuntu 20.04 change background to solid colour

25,016

Solution 1

Newer versions of Ubuntu Desktop have removed the capability to set the background to a solid color. You may run the following command in a terminal window to accomplish this task:

To clear the current image setting:

gsettings set org.gnome.desktop.background picture-uri ""

To set the primary color (the first color in a gradient or the solid color):

gsettings set org.gnome.desktop.background primary-color '#000000'

Reference: https://www.fcpace.com/node/55

Solution 2

So building on Sabrina's answer to create a plain colour gradient background without messing around making an image the following works:

gsettings set org.gnome.desktop.background picture-options 'none'
gsettings set org.gnome.desktop.background primary-color '#004000'
gsettings set org.gnome.desktop.background secondary-color '#306030'
gsettings set org.gnome.desktop.background color-shading-type 'vertical'

The primary colour will be the top (or left if you go for horizontal instead of vertical) and the secondary colour will be the bottom (or right).

Solution 3

For people using the dark theme on recent releases of Ubuntu, there is another gsettings value that may need to be set.

  1. First, clear the background image:
    gsettings set org.gnome.desktop.background picture-uri-dark none
    
  2. Set the background color:
    gsettings set org.gnome.desktop.background primary-color '#000000'
    

Just as with Sabrina's answer, this will show a nice black background again.

(Must be a new feature, as I already did the changes before and it worked. After an update, I got a background image again...)

Solution 4

Solid and Gradient Wallpaper

I use Open Office Draw to create my gradient backgrounds, then export the .odg file as a .jpg. I select this .jpg when I Change Background. I increase the size of the image a little when exporting it. You are welcome to my image, (attached), if you like. In my opinion 20.04 has the worst screen images of any Ubuntu to date.

enter image description here

enter image description here

Share:
25,016
Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    There was an option to change background to solid color. However, I notice that that option is no longer there.

    The only options available are to use existing image or to add picture.

    Was this setting moved to somewhere else?

    enter image description here

    Here are some of the option available in the previous version

    Ubuntu Studio 18.04 64-bit

    Why can't I change my background to a solid colour

    Look at the solid colour settings there

    enter image description here

  • Just_Alex
    Just_Alex over 3 years
    Another reason to love linux.
  • user3757405
    user3757405 over 3 years
    For a simple gradient, you may well find that PNG is both better quality and smaller than the equivalent JPEG.
  • user3757405
    user3757405 over 3 years
    Good resourcefulness. But instead of taking and importing a photo, you could create one cleanly from the terminal, e.g: sudo apt install imagemagick; convert -size 1920x1080 canvas:black black.png (see also stackoverflow.com/questions/39504522/…)
  • user3757405
    user3757405 about 3 years
    A slightly more elegant way to remove the picture might be to set picture-options to none. (Although I suspect Gnome is much smarter than to try and load a picture from an empty string.)
  • Levente
    Levente about 3 years
    This will probably pollute the logs with an error where it does not find an expected bitmap background image.
  • BeastOfCaerbannog
    BeastOfCaerbannog almost 3 years
    This option doesn't exist on Ubuntu 20.04 with the GNOME desktop environment. Do you perhaps use another desktop environment or another version of Ubuntu?
  • Preston Lee
    Preston Lee almost 3 years
    Works on 21.04!
  • PyTis
    PyTis over 2 years
    Honestly, best answer here. It is BS that they've changed (removed) so many items on Ubuntu 20.004. I was lastly using 16.04.10 and have just switched as of today, and want to have ZERO images on this machine (in order to run a special program I need to run) and I come looking on how to NOT have an image as a background, and the FIRST and highest rated answer tells you "how to draw a different image" (that looks like a gradient), if you don't like the ones they have provided by default.
  • PyTis
    PyTis over 2 years
    Like seriously, WTF. I honestly do not even understand how it even got a single up-vote, let alone the 52 it currently has. Back to the issue at hand, IF ANYONE can link me to a page where they are discussing the removing of colors, and forcing of images for backgrounds, I would greatly appreciate it.
  • PyTis
    PyTis over 2 years
    Like seriously, WTF. I honestly do not even understand how it even got a single up-vote. I come looking on how to NOT have an image as a background, and the FIRST answer tells you "how to draw agradient-like different image," if you don't like the ones they have provided by default. The question ASKED was how to NOT use an image, and how to use a color, and you answer with, here is a way to use an image? Back to the issue at hand, IF ANYONE can link me to a page where they are discussing the removing of colors, and forcing of images for backgrounds, I would greatly appreciate it.
  • RogerCO
    RogerCO over 2 years
    @PyTis so just use the "picture-options none" line in the above. and maybe also set a primary-color if you don't want plain black.
  • bomben
    bomben over 2 years
    To the people who removed the option to set a solid color: F* you!
  • Piotr L
    Piotr L about 2 years
    This method also works in 22.04 - well done
  • Admin
    Admin about 2 years
    works for 22.04 LTS