Picture folder disappears after last update


No change will occur in the package and its files, so the user service will still be active (enabled) and triggered after each user login.
The question is “what changed in the user configuration” before the update (which I don’t think it is involved in this issue).

The program (xdg-user-dirs-update.service) is checking LANG and $XDG_CONFIG/user-dirs.{dirs,locale} contents, though I am not sure in which order, or what safety rules exist in the code. A good program would never delete a user folder with contents. It should either rename, or fail with info message.

@33Nicolas did you run this?

Run it again, in case it was not triggered properly, or check these files in your GUI File Manager.

Also check KDE System Settings for the same setting (User files location or something similar)

1 Like
/home/user/.config/user-dirs.dirs:# This file is written by xdg-user-dirs-update
/home/user/.config/user-dirs.dirs:# If you want to change or add directories, just edit the line you're
/home/user/.config/user-dirs.dirs:# interested in. All local changes will be retained on the next run.
/home/user/.config/user-dirs.dirs:# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
/home/user/.config/user-dirs.dirs:# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
/home/user/.config/user-dirs.dirs:# absolute path. No other format is supported.

I’m not sure how to do the following

Also check KDE System Settings for the same setting (User files location or something similar) >

Open System Settings ==> Applications ==> Location

Nevertheless, it seems the Pictures folder was already deleted, before xdg-user-dirs comes in action.

If the problem was with LANG or user-dirs file, it would have deleted all user data folders, not only Pictures.

You have to go back in time and find what other actions you have done, what programs/utilities you had used, etc, that might have done this. PEBCAK :person_shrugging:

1 Like

Crap, so it was user manipulation. I’m not sure why I would have done that. I’ll bring back from an old back up as soon as I figure out how to read my external backup drives. Damn, crappy way to start the week.

Thanks for all your help everyone.

1 Like

In your systemd log of xdg-user-dirs-update.service :

This was crazy to remove your all pictures after update XDG-user-directory configuration.

I tried to reproduce this issue in EOS VM:

  1. I created 3 files in Pictures folder.
$ ls ~/Pictures/
test1.txt  test2.txt  test.txt
  1. I changed the configuration of user-dirs.dirs
$ grep . $HOME/.config/user-dirs.dirs | grep PICTURE
  1. Restart systemd service xdg-user-dirs-update.service and run xdg-user-dirs-update
$ systemctl --user restart xdg-user-dirs-update.service
$ systemctl --user status xdg-user-dirs-update.service 
○ xdg-user-dirs-update.service - Update XDG user dir configuration
     Loaded: loaded (/usr/lib/systemd/user/xdg-user-dirs-update.service; enabled; preset: enabled)
     Active: inactive (dead) since Mon 2023-06-26 21:24:11 CEST; 12min ago
       Docs: man:xdg-user-dirs-update(1)
    Process: 1479 ExecStart=/usr/bin/xdg-user-dirs-update (code=exited, status=0/SUCCESS)
   Main PID: 1479 (code=exited, status=0/SUCCESS)
        CPU: 764us

Jun 26 21:24:11 endeavouros systemd[602]: Starting Update XDG user dir configuration...
Jun 26 21:24:11 endeavouros systemd[602]: Finished Update XDG user dir configuration.
$ xdg-user-dirs-update
  1. Reboot, then see if Pictures folder disappears or not
$ ls ~/Pictures/
test1.txt  test2.txt  test.txt

They are still there. I can’t reproduce this issue.

To reproduce it, as it is assessed,

  • Set value:
  • delete the Pictures folder before reboot.

Then you will get the same messages in the user service status.

1 Like

I see.

So, it’s still retrievable? That would be amazing. Crap, I just started to restore pictures from a backup. I hope that didn’t mess things up. I stopped in the meantime.


Before I read your systemd status log /home/suoni/Pictures was removed which confused me, I thought that the systemd trigger xdg-user-dirs-update.service would delete your pictures by itself after changing your XDG user config, but it’s not true, it just showed the warning message when your pictures were already gone ( by your accidental mistake or dangerous installed software without realizing it ? )

Unfortunately not.

This is a solution. If you said this backup is too old, you can change backup to daily incremental backup. (Plus an additional option: Create hourly snapshot with the ability “deduplication” that is pretty fast if you think your private data in home directory is more important than system and you edit or create your current pictures or data frequently per day)

Thanks, I had daily backups. For some reason, some of my ports are not reading my external backup drives. The front USBs seem to allow for it. This was weird. That picture folder was huge and had a lot in it. I’m sure I’ve lost a few recent things.

Thanks for all your help. I guess it’s gone.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.