Is there a file that contains the path to the selected desktop background?
Upon upgrading to Fedora 36, the desktop background was blank/black. I find that really odd, and it’s the first time in many upgrades that this has happened.
I had a custom background set, but the background is not listed in the available background images anymore. I’m trying to find a config file that contains the path to the background file so I can set it again. In the worst case, I have backups from before the upgrade, so I could retrieve the file too, but I would be surprised if it actually got deleted.
I think the default location for desktop backgrounds is /usr/share/backgrounds or one of the directories under there. It is possible to select images from your home directory tree as well.
To be clear, I’m looking for the path to the background that is set, not the default or custom background directories.
My goal is to get the path so I can find where I put my custom background. I think I had put it in the default background directory of /usr/share/backgrounds/ but it’s not there.
@ilikelinux Sorry, I got mixed up. The upgraded computer runs Gnome Shell.
That would be Useful Information if I used Gnome, which I don’t. In Xfce, which I do use, all I have to do is point the Background tab in Desktop Settings to the folder I want to use and everything in it becomes a potential desktop, and if I want to add another, I just copy it to that folder. Different strokes for different folks.
Maybe I’m not being clear enough, but that’s not what I’m asking. I want to know if there is a (config) file that stores the path to the currently set background file.
I will then navigate to that path in my backups to find my desktop background. Also, it gives me a way to see what background is currently set, not through a gui but in a config file.
So, does anyone know where the current background’s path is stored? Without having to run the OS or a specific desktop background settings control panel for a given desktop environment.
Can dconf or gsettings commands work on a user-specified database file instead of the default? i.e. the ~/.config/dconf from a mounted backup of a system instead of the booted one
While exploring the backups manually and comparing to the upgraded system, I found my old background is contained in /usr/share/backgrounds/fedora-workstation/ but the contents have been deleted/overwritten in the upgraded system…
So at least I found my background, but it seems this is not a safe location to put custom backgrounds. It’s odd, this is the first time since at least f30 that an upgrade has wiped out files in that directory.
$ rpm -qf /usr/share/backgrounds/fedora-workstation/
file /usr/share/backgrounds/fedora-workstation is not owned by any package
$ sudo dnf repoquery --whatprovides /usr/share/backgrounds/fedora-workstation/
# nothing
$ sudo dnf repoquery --whatprovides /usr/share/backgrounds/fedora-workstation/*
fedora-workstation-backgrounds-0:1.2-2.fc36.noarch
fedora-workstation-backgrounds-0:1.3-1.fc36.noarch
$ sudo dnf repoquery --whatprovides /usr/share/backgrounds/
desktop-backgrounds-basic-0:36.0.0-2.fc36.noarch
filesystem-0:3.16-2.fc36.x86_64
filesystem-0:3.18-2.fc36.x86_64
So, the folder is not owned by any package, which means even if the fedora-workstation-background package is uninstalled, it’ll remove the files the rpm provides, but leave the directory and any other files you may have put in there (unless one replaced one of the package files):
I don’t see anything in this package’s commit history suggesting that files not owned by it would be removed/overwritten, but it’s possible another package owned this folder before so it got removed when that was uninstalled. Really hard to figure this out, if it was the case.
No, it was paisaje.jpg which is also among the lines removed in 0001-Trim-out-unneeded-backgrounds.patch. I wonder why… perfectly nice backgrounds removed.
I thought I had downloaded this image myself long ago but apparently it was one provided by default.