3

Ubuntu 22.04 LTS asked me for an update which I did and apparently everything went ok but upon restarting all my home folders appeared in my Desktop.

Looking into my home folder I found out that home/user/Desktop and Public folders show as: Type Link (broken) (inode/symlink). The rest of user folders have different permissions ("Create and delete files") but this file only gives me the options of "Read and write" an "Read-only".

By doing ls -lid to these files as suggested by Raffa, I get:

1334600 lrwxrwxrwx 1 user user 19 ago 19 11:40 Desktop -> /home/user/Desktop

and

1334614 lrwxrwxrwx 1 user user 18 ago 19 11:40 Public -> /home/user/Public

How can I fix this?

I'm currently on 22.04.3 LTS.

2 Answers2

5

I solved it this way:

As suggested by https://forums.linuxmint.com/viewtopic.php?t=198238 I checked that typing

cat $HOME/.config/user-dirs.dirs | grep DESKTOP

showed

XDG_DESKTOP_DIR="$HOME/"

instead of

XDG_DESKTOP_DIR="$HOME/Desktop"

Then I followed this solution How to set the desktop to $HOME/Desktop?

  1. First I deleted all the broken folders
rm Desktop Templates Public Music Videos
  1. I created new folders
mkdir Desktop Templates Public Music Videos
  1. Then I edited configuration file: Typing in the terminal
gedit ~/.config/user-dirs.dirs

I added the missing folders to make it look like this:

XDG_DESKTOP_DIR="$HOME/Desktop" 
XDG_DOWNLOAD_DIR="$HOME/Download"  
XDG_TEMPLATES_DIR="$HOME/Templates"  
XDG_PUBLICSHARE_DIR="$HOME/Public"  
XDG_DOCUMENTS_DIR="$HOME/Documents"  
XDG_MUSIC_DIR="$HOME/Music"  
XDG_PICTURES_DIR="$HOME/Pictures"  
XDG_VIDEOS_DIR="$HOME/Videos"
  1. Save the configuration file, and after logging out and in the problem was solved
sotirov
  • 4,379
pcc
  • 306
3

Adding this as an answer, as I cannot comment yet.

I bumped into the same issue, and I was lucky enough to remember that the only change I made to my system today was to install Okular (as a Snap via the Ubuntu Software app).

The fix above works fine, as long as I don't open Okular. If I do, and then reboot, I am back to square one.

Note that another user is suggesting that adding hidden files to the folders prevents this from happening.

I cannot find any mention of this bug in the KDE bug tracker, so maybe I'll try to add a new one in the coming days. I hope this helps.

Gabe
  • 55