Prevent Firefox from automatically creating directories

Posted on Thu 11 May 2017 in Linux, Firefox

Finally decided to look into something that has been kind of bugging me for quite a while now - Firefox automatically creates ~/Desktop and ~/Downloads directories if they don't exist everytime it starts. Turns out this is a feature, not a bug. It's another example of Firefox being the good guys properly following freedesktop.org guidelines. This functionality can be overridden however by creating ~/.config/user-dirs.dirs with something like:

XDG_DESKTOP_DIR="/home/josh/desktop"
XDG_DOWNLOAD_DIR="/home/josh/downloads"
XDG_TEMPLATES_DIR="/home/josh/templates"
XDG_PUBLICSHARE_DIR="/home/josh/shared"
XDG_DOCUMENTS_DIR="/home/josh/documents"
XDG_MUSIC_DIR="/home/josh/music"
XDG_PICTURES_DIR="/home/josh/pictures"
XDG_VIDEOS_DIR="/home/josh/videos"

I have a bit of OCD and prefer all of my directory names to be completely lowercase. Crazy, I know, but what can you do. Anyway, creating the above file on my Arch machine resolved the "issue" and Firefox no longer creates directories with those evil uppercase letters anymore.

Source: Arch Forums