Hi!
Every now and then, a Desktop folder is recreated in my home directory and I don’t know why. My user-dirs.dirs is as follows:
# 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"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME"
XDG_PUBLICSHARE_DIR="$HOME"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
and I am using Gnome.
Any help would be appreciated!
[user@manjaro ~]$ pamac search --files xdg-user-dirs-update
/usr/bin/xdg-user-dirs-update is owned by xdg-user-dirs
/usr/lib/systemd/user/xdg-user-dirs-update.service is owned by xdg-user-dirs
/usr/share/man/man1/xdg-user-dirs-update.1.gz is owned by xdg-user-dirs
[user@manjaro ~]$ 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; vendor preset: enabled)
Active: inactive (dead) since Sat 2022-05-07 14:41:32 CEST; 2h 50min ago
Docs: man:xdg-user-dirs-update(1)
Process: 778 ExecStart=/usr/bin/xdg-user-dirs-update (code=exited, status=0/SUCCESS)
Main PID: 778 (code=exited, status=0/SUCCESS)
CPU: 2ms
May 07 14:41:32 manjaro systemd[760]: Starting Update XDG user dir configuration...
May 07 14:41:32 manjaro systemd[760]: Finished Update XDG user dir configuration.
[user@manjaro ~]$ systemctl --user cat xdg-user-dirs-update.service
# /usr/lib/systemd/user/xdg-user-dirs-update.service
[Unit]
Description=Update XDG user dir configuration
Documentation=man:xdg-user-dirs-update(1)
[Service]
Type=oneshot
ExecStart=/usr/bin/xdg-user-dirs-update
[Install]
WantedBy=default.target
It recreates it on every reboot. Also additionally on login (autostart) it will run /usr/bin/xdg-user-dirs-gtk-update to update the folder names to the locale you set here: ~/.config/user-dirs.locale.
I’m confused because this used to work on a previous distro. I am not sure why the Templates folder is never recreated, though I have used the same syntax.
I also tested this:
xdg-user-dir DESKTOP
/home/my-user-name
which tends to indicate that xdg-user-dir understands what I want?
I had the same issue (file showing up again and again). In my case the cause for it was an automatic backup with the setting “synchronize source and destination” in stead of “backup source”.