3 ms·
> a Desktop directory. That last one has been created by Steam, which is quite unfortunate as I simply do not have a desktop or a desktop environment on my mach
by account42 4y ago
> a Desktop directory. That last one has been created by Steam, which is quite unfortunate as I simply do not have a desktop or a desktop environment on my machine.
Chrome and a number of other software insists on creating some of these directories (e.g. Downloads) too.
However you can fix that by setting XDG_DESKTOP_DIR and XDG_DOWNLOAD_DIR in ${XDG_CONFIG_HOME}/user-dirs.dir to something else (e.g. your home directory).
- Beltalowda 4y agoI have tried everything under the sun, including user-dirs.dir: % cat ~/.config/user-dirs.dirs XDG_DESKTOP_DIR="$HOME" XDG_DOWNLOAD_DIR="$HOME" Yet still: % ls -ld ~/Desktop drwxr-xr-x 2 mt mt 4096 Oct 22 18:04 /home/mt/Desktop/ Sometimes there's a ~/Downloads directory too. But not today. I have no idea what keeps creating these. It's pretty annoying as I have a lot of intentionally short-named things in my ~ for easy shell usage, and it really sticks out. inotify doesn't support reporting the PID of the process that triggered the event, but it seems fanotify does. Maybe I should set up a watcher for this.
- commotionfever 4y agotry systemctl enable --now xdg-user-dirs-update.service and just to be safe I have a snippet that parses that file and exports the variables in my login shell like .profile (fish in this example but would be similar for other shells) sed -nE 's/^([^=#]+)=(.*)/set -gx \1 \2/gp' <"$XDG_CONFIG_HOME/user-dirs.dirs" | source
- noiwillnot 4y agoTry to set enabled=False in ~/.config/user-dirs.conf https://www.unix.com/man-page/centos/5/user-dirs.conf/ https://www.unix.com/man-page/centos/5/user-dirs.conf/