Each Linux system has a set of background images and allows to use users’ own photos as desktop wallpaper. Sometimes, user forgot or removed the original photos by accident or found a good system background and want to use in another PC.
In this tutorial, I’m going to show where your Linux stores these background images. So you may copy and edit them, or share with your friends.
Question 1: Where Linux stores the system default background images:
Answer: The default set of background wallpapers are usually available in “/usr/share/backgrounds” directory and/or its sub-directories. Files in that location belong to root user account, so you can not copy & paste them anywhere directly in file manager. Following steps may help copying and managing the file’s ownership.
1.) Firstly, open file manager and navigate to ‘Other Locations -> Computer -> usr -> share -> backgrounds’.
2.) Find out the image file in that folder or sub-folders. Then right-click on blank area and click ‘Open in Terminal‘ to open terminal window.
3.) Next, copy and paste the file into user’s home directory via command:
sudo cp FILENAME ~/
Just type a few letters and try hitting 'Tab' to auto-complete the filename. Drag and drop file into terminal also input the file automatically!
4.) The copied file is locked due to permission issue. You have to change the ownership via command:
sudo chown $USER:$USER ~/FILENAME
Question 2: I forgot/removed the original background photos, how to find them back:
Answer: If you’ve set an image as desktop wallpaper. Linux will make a copy of the file and save it in a certain folder. So, you may restore the file even after removed the original one.
For images you set via files’ “Set As Wallpaper” context (right-click) menu option, Linux (e.g., Ubuntu and Fedora) make copy and save the files at user’s ‘Pictures/Wallpapers‘ folder.
As you see, it creates duplicated files due to how many times you use ‘Set As Wallpaper‘ option for a photo image.
Some user may add wallpapers via the ‘Add Picture…’ button in “Settings -> Background” page. So, they will display as optional images for use at any time.
For these files, most Linux stores the files at user’s “.local/share/backgrounds/” directory. Note, it’s a hidden folder. In file manager, press Ctrl+H to toggle display hidden folders or not.
All these files belong to you, you may do copy & paste, and/or edit them without permission issue. That’s all, Enjoy!