Firefox – How to Change TMP Directory for Downloads on Linux

downloadfirefoxlinux

I just made a clean install of my Debian system and when it comes to partitionning the hard drive i choose the option with /, /home, /var /usr and /tmp are on seperate partition this time. Then i let the default config for the partition table.

Now i have a problem whatever is firefox (iceweasel in fact) downloads directory, it in fact download to /tmp and then copy the entire file to that location when the download is finished.

My problem is that my /tmp partition is to small for some of my downloads, so for now i have to use wget instead but that's not very convenient. I know that some firefox add-ons could make firefox use wget for each downloads but i don't want that.

So my question is, how to tell firefox to downloads in a specific directory during the downloading process? (Is that even possible?)

I took a look at about:config but i didn't saw anything that seems related to what i want.

Best Answer

According to the source code (xpcom/io/SpecialSystemDirectory.cpp: lines 419-433) you can set any of the environment variables TMPDIR, TMP, or TEMP to the path of the directory where you want your temporary files to be stored.

Related Question