Prevent creation of userdirs in home directory

Please post all general support questions for LXDE here.
Locked
asherxo
Posts: 1
Joined: Mon Aug 24, 2020 4:22 am

Prevent creation of userdirs in home directory

Post by asherxo »

I have installed Lubuntu 14.04.
Since I don't want the default directories that are automatically created in my home directory (Documents/ Downloads/ Music/ Pictures/ Public/ Templates/ Videos/) I have deleted those directories and changed the configuration file
/etc/xdg/user-dirs.conf setting enabled=False.

This works fine for the directories Documents/ Downloads/ Music/ Pictures/ Public/ Videos/ but Templates/ is recreated every time I log out and log in again.I still can change the name of the templates file by setting XDG_TEMPLATES_DIR in $HOME/.config/user-dirs.dirs. So as a workaround I can set XDG_TEMPLATES_DIR="$HOME" or XDG_TEMPLATES_DIR="$HOME/.Templates". rr.com But I find it strange that Templates/ is recreated despite the fact that I explicidly configured the system not to do so.Then I removed the packages that create those directories with:
apt-get purge xdg-user-dirs xdg-user-dirs-gtkmbut the templates directory is still created with the name from XDG_TEMPLATES_DIR as set in $HOME/.config/user-dirs.dir Then I tried out what happens when I remove the files $HOME/.config/user-dirs.dirs and $HOME/.config/user-dirs.locale.
It turns out that the templates directory is still recreated now again with the name Templates/. Clearly this directory is created by some setting in lubuntu, but I have been unable to find this.Does someone know where/how this is configured?
Last edited by asherxo on Tue Sep 29, 2020 3:00 pm, edited 1 time in total.
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Prevent creation of userdirs in home directory

Post by drooly »

Have you looked at $HOME/.config/user-dirs.defaults and $HOME/.config/user-dirs.dirs?
You could try simply removing/commenting all entries from these files, or set the variables to an empty string:
Templates=
etc.

It is strange that directories get recreated after purging xdg-user-dirs*. Did you reboot after purging them?
Locked