I am currently in a learning program. We are asked to download a specific image and then use it as wallpaper, doing so form the command line. The directions given yields nothing:
First we have to download an image, and then we will use the command to make it our background.
$ wget -O ~/Downloads/wallpaper.jpg "https://raw.githubusercontent.com/hoppersroppers/hoppersroppers.github.io/main/_layouts/constitution.jpg"
$ gsettings set org.gnome.desktop.background picture-uri file:////tmp/wallpaper.jpg
Now your background image should be a picture of a ship! If it didn't work, troubleshoot.
https://www.baeldung.com/linux/change-desktop-wallpaper-from-terminal primarily because C/P the commands as given yields no change. I am figuring this is a "test". I don't understand why its directing to tmp if the image is in downloads?
ob@adminbaby:~/Desktop$ wmctrl -m
Name: GNOME Shell
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: OFF
bob@adminbaby:~/Desktop$ gsettings set org.gnome.desktop.background picture-uri file:////tmp/wallpaper.jpg
bob@adminbaby:~/Desktop$ pwd
/home/bob/Desktop
bob@adminbaby:~/Desktop$ ls
first
bob@adminbaby:~/Desktop$ sudo gsettings set org.gnome.desktop.background picture-uri file:////tmp/wallpaper.jpg
[sudo] password for bob:
(process:2230): dconf-WARNING **: 16:39:33.016: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)
bob@adminbaby:~/Desktop$ gsettings set org.gnome.desktop.background picture-uri file://// ~/Downloads/wallpaper.jpg
Usage:
gsettings [--schemadir SCHEMADIR] set SCHEMA[:PATH] KEY VALUE
Set the value of KEY to VALUE
Arguments:
SCHEMADIR A directory to search for additional schemas
SCHEMA The name of the schema
PATH The path, for relocatable schemas
KEY The key within the schema
VALUE The value to set
bob@adminbaby:~/Desktop$ sudo gsettings set org.gnome.desktop.background picture-uri file:////home/bob/Downloads.jpg
(process:2240): dconf-WARNING **: 16:40:57.446: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)
bob@adminbaby:~/Desktop$ gsettings set org.gnome.desktop.background picture-uri file:////home/bob/Downloads/wallpaper.jpg
bob@adminbaby:~/Desktop$ sudo gsettings set org.gnome.desktop.background picture-uri file:////tmp/wallpaper.jpg
bob@adminbaby:~/Desktop$ wmctrl -m
Command 'wmctrl' not found, but can be installed with:
sudo apt install wmctrl
bob@adminbaby:~/Desktop$ sudo apt install wmctrl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
wmctrl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.6 kB of archives.
After this operation, 63.5 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu lunar/universe amd64 wmctrl amd64 1.07-7ubuntu1 [20.6 kB]
Fetched 20.6 kB in 0s (62.8 kB/s)
Selecting previously unselected package wmctrl.
(Reading database ... 203962 files and directories currently installed.)
Preparing to unpack .../wmctrl_1.07-7ubuntu1_amd64.deb ...
Unpacking wmctrl (1.07-7ubuntu1) ...
Setting up wmctrl (1.07-7ubuntu1) ...
Processing triggers for man-db (2.11.2-1) ...
bob@adminbaby:~/Desktop$ wmctrl -m
Name: GNOME Shell
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: OFF
bob@adminbaby:~/Desktop$ realpath -s wallpaper.jpg
/home/bob/Desktop/wallpaper.jpg
bob@adminbaby:~/Desktop$ sudo gsettings set org.gnome.desktop.background picture-uri file://///home/bob/Desktop/wallpaper.jpg
(process:2829): dconf-WARNING **: 16:53:30.948: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)
bob@adminbaby:~/Desktop$ gsettings set org.gnome.desktop.background picture-uri file:///home/bob/Downloads/wallpaper.jpg
bob@adminbaby:~/Desktop$
bob@adminbaby:~/Desktop$ realpath -s wallpaper.jpg
/home/bob/Desktop/wallpaper.jpg
bob@adminbaby:~/Desktop$ sudo gsettings set org.gnome.desktop.background picture-uri file://///home/bob/Desktop/wallpaper.jpg
(process:2829): dconf-WARNING **: 16:53:30.948: failed to commit changes to dconf: Failed to execute child process “dbus-launch” (No such file or directory)
bob@adminbaby:~/Desktop$
cat /etc/os-release
)? 1. Make sure you are using Gnome Desktop Enviroment (echo $XDG_CURRENT_DESKTOP
). 2. Ensure you have~/.config/dconf
folder with correct ownership and permissions(see) – davidt930 Sep 28 '23 at 05:47gsettings
saves changes to$HOME/.conf/dconf/user
database[2]. After changing the wallpaper try runningstrings $HOME/.config/dconf/user|grep -i uri
to make surepicture-uri
is set as desired. [2][link](https://unix.stackexchange.com/questions/107402/when-do-changes-to-gsettings-take-place#answer-114706) – davidt930 Sep 30 '23 at 01:35