In February last year I bought my first MacBook with OS X 10.4 alias Tiger installed and I was happy to say “Hello” to the Apple folks. Ever since it was a bit of work and I had to learn a lot until everything worked like expected. But there is still one thing which bugs me when running Firefox or Thunderbird on a fresh OS X installation. Both applications don’t use a reasonable temporary folder. Instead files which are opened by helper applications are stored under ~/Desktop or ~/Download and will not be removed sometimes after Firefox or Thunderbird are closed. This results in a really cluttered desktop or download folder. All the following steps have to be done because there is no way to specify the temporary folder from within Firefox and Thunderbird. Both lack an UI or a hidden preference to change this folder. I cannot say when this will be changed, but there is a reported bug about this issue. But lets go on…
As a circumvention it was possible to use Safari and change its download folder to the specified location. From now on Firefox and Thunderbird are using this folder to store the temporary files. It’s not the best solution but I’m fine with that because I do not use Safari and I’m not interested in its download folder. But with the release of Safari 3 this isn’t possible anymore. The newer versions are using an other way to store its download folder settings and don’t touch ~/Library/Preferences/com.apple.internetconfig.plist anymore. So how it can be easily changed without using a plist or hex editor?
It’s just easy. Download one of the former versions of Safari and use it to change the download folder. There is a project called Multi-Safari which gives you the possibility to run different versions of Safari in parallel. So grab the latest Safari 2 release, open the preferences, and select another download folder location. It looks like that the best solution is to use ~/Library/Caches/TemporaryItems (NS_OS_TEMP_DIR) where all contained files will be deleted on restart. If you want to have the files deleted on exit of Firefox or Thunderbird you can also add the preference browser.helperApps.deleteTempFileOnExit and set its value to true. That’s all.
Please remember that this is just a workaround. It would be nice to see bug 311292 fixed in a timely manner.
There’s a hidden preference to clean up the temp files on exit.
Yes, that’s the one I mentioned in my post. But it’s not working at all. Probably if you are using hibernation mode temporary files are getting lost after wake-up and closing Firefox. I’ll have a look at this part within the next days again.
This is great. Thanks much for posting – I was going crazy trying to figure something out to reduce the clutter.
A quick (unrelated) question since you are a Mozilla + Mac OS X user. I’m having trouble opening Office 08 attachments using Thunderbird. The app opens ok when I double-click attachment, but with a blank (or no) doc/spreadsheet/presentation.
A strange file named “dftmpOJLFOFEMlkkkkkkk——–” labeled as text, but not openable using TextEdit also appears with every download.
Any ideas? Would greatly appreciate feedback (if any).
Arnav, we should discuss it outside of this blog post. You can just give me a reply via mail.
Hi there!
Thank you for the workaround. I was able to download safari 2.0.4 and change the download directory to a temp directory without issue. Why they make the default behavior to save PDFs to the desktop is absolutely beyond me. If I want to save the PDF to my desktop, I will click SAVE. (what a novel concept!)
Thanks again!
– IPv6Freely
There is some ongoing work and it will hopefully get fixed in the near future. Sorry that I cannot give more information about. But this issue still needs someone who is willed to fix. Any contribution is highly welcome!
OMG its still not fixed even in Thunderbird 3 Beta 2 🙁
It’s actually pretty simple to get the wished behavior in FF3/TB3: Just choose “Save files to” (under Preferences->General in FF or Preferences->Attachments in TB), choose the temporary folder you want to save to, then click on “Always ask me where to save files”. Even though the folder you chose will then be grayed out, it will always default to saving your files there *when you “open” them*. When you “save” files on the other hand, it will predictably let you navigate to a folder of your choice, and will remember the last location you chose to save to.
Mike, fabulous fix. Thank you!
The default Thunderbird behaviour is still stupid (what were the developers thinking? I read their debate about it… can’t understand why people were thinking even for a second that dumping copies on the desktop was a good idea) but at least it can now be modified. Not very intuitive but easy enough to do.
Hi Mike,
I tried to use you suggestion of the /tmp file but I can’t get Thunderbird to see OSXs hidden files & folders once I have made them visible in the Finder/ OS, Do you have any suggestion how I can implement your suggestion?
N.D.,
Fi.
For Thunderbird it should be transparent. It uses the system file open or save dialog. So please check if other applications have the same problem. Eventually a restart of the application is necessary?
Hi Henrik,
Thank you for your quick reply. I tried your suggestion but to no avail. I will need to look a bit further in to this issue but I will use your original tip all the same.
N.D.,
Fi.
If you need to go to a hidden file which is /tmp folder, you need to either set finder to display those files (there are lots of tips for that in the net), or for a one time solution use Cmd+Shift+G, which will give you a goto-box, and enter /tmp or /private/tmp, that’s the same.
Thank you Roland,
the Cmd+Shift+G trick was the most useful hint on this thread.
It works for both Thunderbird and Firefox.
Cheers,
Lukas