Score:1

Home directories turned into symbolic links without telling me the reason

cn flag

it was a normal day for me like any other day and I decided to open my Laptop for work and what I see the first is the following:

enter image description here

Then, I tried to find out what happened to these folders through the terminal and then I saw this:

enter image description here

And I tried to find a solution over the internet and found a lot of answers but nothing worked for me and when I try to cd into the Videos directory I get the following error:

bash: cd: Videos: Too many levels of symbolic links

which clearly states that this thing has fallen into a recursion hell which has no return as the directory is pointing itself and yet I don't have a clue why it happened and how to fix this. Moreover, my desktop also suddenly decided to start showing me the home directory contents on the screen when I had them turned off.

ar flag
Which version of Ubuntu are you using? I have been using Ubuntu for over 20 years and never seen Ubuntu doing anything on its own. Maybe you did something. If you don't tell us, we can't help.
Ayush avatar
cn flag
@user68186 `Ubuntu 20.04.6 LTS` and nowadays I'm working on the project `ivy` and I don't remember doing anything else expect for writing code and it's not just this time when ubuntu did something on its own it happened a lot of times before. It just needs a shutdown before it shows me something unexpected.
Marco avatar
br flag
see `man xdg-user-dirs-update`. But you have to find out by yourself, why this did not work in your case. As it works in general, there must be something special on your system.
TVG avatar
cn flag
TVG
I do have the exact same problem with Ubuntu 23.04: https://unix.stackexchange.com/questions/755324/inaccessible-folders-too-many-levels-of-symbolic-links. Deleting and recreating the folders (which were empty in my case) solved the problem. However, a few minutes later, they turned into symbolic links again.
Score:0
cn flag

UPDATE: Boys, I thought this was a permanent fix but it seems out that this is just a temporary workaround. Once in a week the directories are turning themselves to symlinks by themselves.

I had to make a sacrifice, I deleted those directories! I sacrificed the directories and their contents; there wasn't much in them in my case but if it happens to you then you might have to do it too.

I deleted the directories and re-created those directories with the help of mkdir command (simple right?).

Regarding the desktop icons that suddenly decided to show up on the desktop screen, I wonder why the following didn't work:

  • gsettings set org.gnome.desktop.background show-desktop-icons false
  • gsettings set org.gnome.shell.extensions.desktop-icons show-home false

Neither it did work using the dconf-editor.

It worked many times before but this time it just didn't, but what worked in my case was disabling the desktop icons from the Extensions:

Look for the Extensions if it is already installed:

enter image description here

Disable the Desktop icons if it is enabled:

enter image description here

TVG avatar
cn flag
TVG
After recreating the Desktop folder, edit the file `~/.config/user-dirs.dirs` from `XDG_DESKTOP_DIR="$HOME/"` to `XDG_DESKTOP_DIR="$HOME/Desktop"`. The folder icons on your Desktop should return in your home/.
TVG avatar
cn flag
TVG
Are you sure your directories were not empty? In my case, the folders that automatically turn into symbolic links are always empty and it only happens to the directories listed in `~/.config/user-dirs.dirs`.
Ayush avatar
cn flag
All of the directories that turned into symbolic links in my case were all empty, I thought this might infect the other directories and I might loose my data. So I thought it would be better to ask for a cure before it happens.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.