Skip to content

[Linux] The default “Desktop” folder disappears

Today, A strange problem occurred on my computer: After we use the graphical interface for the first time, Ubuntu will automatically create a folder named Desktop as our desktop, so the desktop of the Ubuntu graphical interface will display all the files in this folder.

But today when I logged in my account, my Desktop folder is disappeared. I rebooted and prayed for it to return to normal (it often succeeds). However, the files under the Home folder are displayed of the graphical interface.

I searched a few keywords on the Internet, finally I found a solution: Why is my desktop the same as home folder?

It seems that this stranger has the same troubles as me. Fortunately, after I followed the steps below, my computer finally returned to normal.


Solution

First of all, we can confirm that the Desktop folder is still existed. If it has disappeared, then we need to create a new folder with the same name.

mkdir ~/Desktop

Then, we started to modify the configuration file:

sudo vim ~/.config/user-dirs.dir

We should see a row of XDF_xxxxxxxx settings. At present we only need to pay attention to the line XDG_DESKTOP_DIR, if this line does not exist, then add it yourself.

Modify it to:

XDG_DESKTOP_DIR="$HOME/Desktop"

Set the directory to the Desktop folder we just created. Then restart the computer, and you should see that the desktop is normal.

Tags:

Leave a Reply