Who is creating Documents/Video/Pictures/etc. in home directory

This is carried out by the xdg-user-dirs-update1 package.

The file /usr/bin/xdg-user-dirs-update is run at logon and creates the files based on defaults in /etc/xdg/user-dirs.defaults, or if it exists $HOME/.config/user-dirs.dirs.

If you want to disable it, the setting is in /etc/xdg/user-dirs.conf, or uninstall the package, if dependencies allow.


1: The package name above is for Ubuntu. On Fedora and Arch it is xdg-user-dirs.


These directories are specified by Freedesktop under the name xdg user directories. It's used by quite a few applications, not just the most in-your-face desktop environments.

There is a utility xdg-user-dirs-update which creates these directories if they're missing. You can try to track the invocations of this utility, but that's a lost cause: sooner or later an application will want one of these directories and create them all. On Ubuntu at least, it's called from the session startup scripts that are executed whenever you start an X session, and you can't suppress that without dirty tricks (or being root).

To get the directories out of the way, edit ~/.config/user-dirs.dirs and set them to the paths you like. The only one that you can't really change is XDG_CONFIG_HOME=~/.config, because that's used to find the user-dirs.dirs file.