What to do if the Desktop folder was deleted by accident

Not long after installing Zorin 16 Core, I downloaded all the updates available for programs and firmware through the pre-installed update program. However, after finishing and rebooting, I noticed the desktop folder was gone and now the desktop displayed the contents of the home folder instead.

After a few days of trying to search for a solution, I found something that worked on a post from 12 years ago on an ubuntu forum:

Basically, what you have to do first is create a new desktop folder in your home folder.

Then, click on the 3 bars icon in the top right part of the file manager and enable the show hidden files option.

Then open the ".config" folder.

Open a file called "user-dirs.dirs"

This should show up:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
# 
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Images"
XDG_VIDEOS_DIR="$HOME/Videos"

If it says XDG_DESKTOP_DIR="$HOME/Desktop", just creating a folder named "Desktop" should automatically turn that folder into your actual desktop. However, if it doesn't end in the word "Desktop" and just has "$HOME/", you should type in the name of the folder that you want to use for your desktop.

If you have your system in another language, having the desktop folder in your language is as easy as typing it in that language in both places: the file I mentioned before and the name of the folder.

For example:

XDG_DESKTOP_DIR="$HOME/Escritorio"

^This will search for a folder named "Escritorio" (desktop in spanish) in your home folder, and if it finds it, it will use it as your desktop folder.

2 Likes