Closed Bug 302433 Opened 19 years ago Closed 19 years ago

[FIXr]Helper application temp files litter the desktop on Mac

Categories

(Core Graveyard :: File Handling, defect, P2)

All
macOS
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.8beta4

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Depends on 1 open bug)

Details

(Keywords: verified1.8)

Attachments

(1 file)

Right now, when we open a URL in a helper application on Mac, we perform the
following steps:

1)  Download the data to a file on the desktop
2)  Open that file in the helper application
3)  Never delete the file.

I realize that this was done on purpose because apparently Mac users preferred
it this way, but I have a mac user here who's driven mad by this.  She ends up
with dozens of PDF files and such littered on her desktop after a few days of
browsing, and since we don't mark the files we crap on the desktop in any way,
separating them from the other files (the ones she explicitly saves there) is a
time-consuming process.

I'm not sure what we want to do about this.  Perhaps the choice for whether to
delete the files on app exit should switch from being a platform ifdef to being
a preference.  That might not help much, though, since quitting the browser is
not a common action unless one shuts off the computer or something.  Could we
perhaps prefix all the filenames with "moz_" or "fox_" or whatever so that
they'd be easy to delete?  Alternately, can we use some sort of directory that
will automatically be cleaned up by the OS as needed?  /tmp is a decent choice
there, in my opinion...

Having watched Emma struggle with this over the last year or so, what we have
now is just not usable...
This is a tough one. The real problem, of course, is that we never know when the
user is done with the file, and we can't expect them to know to save a copy
somewhere if they want to keep it.

There are places to put the file to have it deleted "later", e.g. the chewable
items folder, that gets cleared on the next reboot, but I'm sure if we did that,
we'd get complaints.

An alternative would be to pick a different default location, rather than the
Destktop, like ~/Documents/Downloads or something. I'm sure most people wouldn't
care about clutter if it wasn't on the desktop.
OS: Linux → MacOS X
Hardware: PC → Macintosh
Depends on: 191239
The other option, as I said, is to use the desktop but to let the user change
the "delete on quit" behavior (so make it a pref, with no UI maybe, instead of a
platform ifdef).

In fact, I might just go ahead and do that (with default values set accordingly
in all.js).
borris: re: comment #2, if you do that, you'll have fixed bug 302664 :)

my files don't clutter the desktop.  they clutter a different folder that i
can't seem to figure out how to change.  i think it may be the default folder i
chose for downloads in safari?  in any case, i want the behavior i get in windoze.
Blocks: 302664
I think I'd like to do this for 1.8 to at least give users some choice here...
Attachment #193402 - Flags: superreview?(sfraser_bugs)
Attachment #193402 - Flags: review?(cbiesinger)
Attachment #193402 - Flags: review?(cbiesinger) → review+
Comment on attachment 193402 [details] [diff] [review]
Proposed patch to implement a pref

I don't see all.js defaults here (just the fallback #ifdef). (You can remove
the defined(XP_MAC); that's obsolete now.)
Yeah, I talked to biesi and we decided there was no reason to add this to all.js
given that we're already doing the right fallback in the C++...
(In reply to comment #6)
> Yeah, I talked to biesi and we decided there was no reason to add this to all.js
> given that we're already doing the right fallback in the C++...

The advantage of having all.js defaults is that (savvy) users can then more
easily see that the pref exists. But I don't feel strongly in this case.
Attachment #193402 - Flags: superreview?(sfraser_bugs) → superreview+
Comment on attachment 193402 [details] [diff] [review]
Proposed patch to implement a pref

Very safe change that allows customizing the "delete temp files on exit"
behavior via a pref if desired.
Attachment #193402 - Flags: approval1.8b4?
Assignee: nobody → file-handling
Flags: review+
Product: Firefox → Core
QA Contact: file.handling → ian
Assignee: file-handling → bzbarsky
Priority: -- → P2
Summary: Helper application temp files litter the desktop on Mac → [FIXr]Helper application temp files litter the desktop on Mac
Target Milestone: --- → mozilla1.8beta4
Fixed on trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Flags: blocking1.8b4+
Attachment #193402 - Flags: approval1.8b4? → approval1.8b4+
Fixed on branch.
Keywords: fixed1.8
(In reply to comment #11)
> *** Bug 371608 has been marked as a duplicate of this bug. ***
> 

Is there now a way for a normal user to fix this problem in the current firefox (2.0.0.1)? It is really annoying the have the desktop cluttered. Actually I have tried various other browsers just because of this, ended up with firefox again because sooo used to all the shortcuts =)

If anyone here has a hint what is the solution, that would be good.
For the non-geek, the solution is...

1. Go to the URL about:config

2. Right/Control-click anywhere in the page, and select “New” - “Boolean” from the context menu.

3. In the dialog that pops up, type (eh, paste) browser.helperApps.deleteTempFileOnExit for the pref name, and then choose true for the value in the next dialog.

4. Enjoy seeing the litter cleaned up when you next quit Firefox.

I'd like to suggest to integrate this option in the GUI since I heared from some other friends that the "cluttering" also annoys them on their macs.
But is this a solution for the problem?

If  I want to save a file permantly, I click "save" in Firefox, not "open". And If I want to save an opened file, I can save it using the program opening the file.

Yes with this fix it is not as annoying as before, but it's still annoying if you don't switch your Mac off every day, but instead use standby (e.g. simply ba closing the MacBook). If you do this, Firefox will not be closed.

To solve the issue, there is another option needed, to change the path where to save the files. And by default, this path should point to the same directory, where static content from websites is saved.

I have looked for a solutions in a lot of forums, most people are really annyed and use workarounds like a PDF viewer plugin (http://www.schubert-it.com/pluginpdf/), but this is not available for intel-macs...

And nobody knew about this "fix".
> But is this a solution for the problem?

Depends on which problem you're trying to solve.  It's a solution to the problem I was trying to solve, for sure.

> to change the path where to save the files.  And by default, this path should
> point to the same directory, where static content from websites is saved.

The relevant code is:

1576   rv = NS_GetSpecialDirectory(NS_MAC_DEFAULT_DOWNLOAD_DIR,
1577                               getter_AddRefs(mTempFile));

Which asks Internet Config for the download directory set in your operating system setup.  This is apparently not set by default for new accounts, so we fall back to the desktop.  But there's nothing stopping you from setting it up.
You call it "operating system default", but if you want to change it, you have to open another browser (safari) and change the settings there.

So if you want to tell Firefox to not store every opened file permanently on desktop, you have to:

1. create a new browser.helperApps.deleteTempFileOnExit entry in about:config, and

2. have to open another browser and change the default download path in its settings

AFAIK both is only documented in bugzilla. Why not add the browser.helperApps.deleteTempFileOnExit setting and the default download path, or even better use a temporary directory when opening a file. 


Safari works different when opening/downloading files. When you click on a link to a file (pdf, doc...) using Safari, it will not ask you if it should save it or open it, like Firefox does. Some files like pdf will be opened automatically, most others like doc will automatically be loaded to the download directory only (and not opened at all). So it makes a lot of sense to have directory like desktop to save them permantenty (because otherwise you will never see them).
But with Firefox you allways have the choice if you click on a link to a pdf or doc file: You can open it with a program for that purpose (in this case you don't want to save the file), or you can choose to save the file permanently to a directory.

It doesn't make any sense to copy Safari behaviour, if we are talking about different functionality!

What's the problem with using a temporary directory when the user clicks "open" and not "save"? Why not use the same implementation/behaviour like Firefox on Windows etc.?
> You call it "operating system default", but if you want to change it, you have
> to open another browser (safari) and change the settings there.

This didn't use to be the case.  It's not exactly our fault that Apple has removed the System Preferences UI for this stuff (while at the same time claiming that applications should honor those preferences, naturally!).  Do file a bug on Apple, please.  ;)

> What's the problem with using a temporary directory when the user clicks
> "open" and not "save"?

As I understand, it violates the Apple HIG and last time an actual usability study was done on Mac users they didn't like it.

> Why not use the same implementation/behaviour like Firefox on
> Windows etc.?

Users didn't like that behavior.  See the comments in the code.

This works well. Thanks Boris.

But there is one thing which does interfere with Safari. Why we have two "download" locations and differentiate between real download location and temporary file location? Shouldn't that be the same directory while following the Apple HID rules? I switched to Mac OS X some weeks ago and this is the most annoying "feature" for me.
Status: RESOLVED → VERIFIED
Keywords: fixed1.8verified1.8
No idea.  Ask the Firefox folks who wrote the code that does the "real download location"?  That's not back-end code.
I thnk Mozilla should try to mimic MacIE's behaviour where you could on a MIME-type basis decide what to do with a file (open with browser, open with plug-in, save in default download folder and save in a temporary directory and optionally open it with an external viewer).

This was a complete and flexible solution.

See also bug #191385
> I thnk Mozilla should try to mimic MacIE's behaviour

Sounds reasonable.  Please file a bug on that?
Boris, I argue for this behaviour in bug 191385 but it is marked as wontfix which I think is wrong. Please comment there and/or vote for it.
Could we have at least one person who is happy with the setting now?
For my part, I have to totally agree that the lack of configuration within the GUI basically forced me to have a crazily cluttered desktop (and what the heck? As a normal user I cannot even set it up anywhere!). From another friend I know that he also thought it was a bug, which will eventually be fixed.
Where is the poll from back then by the way, which says that mac users want a cluttered desktop, whether they like it or not (since there's no setup)?!!
I'm not sure, but that somehow sounds totally rediculous to me!!
(In reply to comment #1)
> This is a tough one. The real problem, of course, is that we never know when
> the
> user is done with the file, and we can't expect them to know to save a copy
> somewhere if they want to keep it.

yep, I totally agree. That's why we should give him a choice? =)

> There are places to put the file to have it deleted "later", e.g. the chewable
> items folder, that gets cleared on the next reboot, but I'm sure if we did
> that,
> we'd get complaints.

..that's why we again should let him decide.

> An alternative would be to pick a different default location, rather than the
> Destktop, like ~/Documents/Downloads or something. I'm sure most people
> wouldn't
> care about clutter if it wasn't on the desktop.

That's true! But that again needs to be modifiable.
(In reply to comment #17)

> This didn't use to be the case.  It's not exactly our fault that Apple has
> removed the System Preferences UI for this stuff (while at the same time
> claiming that applications should honor those preferences, naturally!).  Do
> file a bug on Apple, please.  ;)

IMO the problem is, that Firefox/Thunderbird uses this setting for something, it is not meant for. When I click on a link I want to view the content, and not download it. Same for HTML, if I follow a HTML link, I want to view the HTML page, not download it and store it permanently on my desktop. So why using a "download" system preference at all? Perhaps this is meant for Safari with its different Download feature, where such a setting makes sense.

> > What's the problem with using a temporary directory when the user clicks
> > "open" and not "save"?
> 
> As I understand, it violates the Apple HIG and last time an actual usability
> study was done on Mac users they didn't like it.

Can you or someone else please tell me where I can find out more about that study? I can't believe it, because all other OS X applications which can receive files like OS X Mail, Safari, MacIE... behave different. If I click on a PDF attachment in OS X Mail (to view it) it is opened, but only saved in a temporary directory. If I do the same with thunderbird, it is opened and saved permanently  on the desktop. I don't think OS X Mail from Apple breaks its own HIG. And some years ago MacIE was the default browser on OS X, which also behaves different.

> > Why not use the same implementation/behaviour like Firefox on
> > Windows etc.?
> 
> Users didn't like that behavior.  See the comments in the code.

Can you point me to the file, where I can find the comments?
> I argue for this behaviour in bug 191385 but it is marked as wontfix

It might be worth re-evaluating, now that the Mac user demographic has changed quite a bit...

> Where is the poll from back then by the way

It was a usability study performed by Netscape.  Unfortunately, they only made the overall results public.

> Can you or someone else please tell me where I can find out more about that
> study

Like I said, the Netscape usability folks would know.  Good luck finding them, though. :(

> Can you point me to the file, where I can find the comments?

See the diff in this bug.

In any case, none of this has to do with what I filed the bug on, which was to implement a power-user preference.  If people are talking about changing defaults or adding UI, please file separate bugs to that effect.
I have filed a new 'summary bug' for this bug and for bug 191385

See (and vote for) bug 374184
Hmm... sorry to interrupt the discussion O.o

But i have a question : I use a special CRM software that enables me to create notes with attached files. When i attach a PDF file, it gets the following link:

http://127.0.0.1/sugarcrm/download.php?GUIDnumber...............=notes

When i click on this link, the PDF file would downloaded on the desktop and not open, eventhough all settings in FF are set on "open with PDF plugin blabla"

what's wrong O.o

thx 4 help
Has any progress been made on this bug?  I don't know if people realize how
hugely problematic this is.. I've tried to install Firefox on several people's
macs (computer novices), but they get so fed up with the documents all over
their desktop that they just go back to Safari !

The deleteonexit setting in about:config helps, but it is a very poor
work-around.

There's been plenty of talk in the blogosphere about this issue as well:

http://rbtech.blogspot.com/2007/09/firefox-files-****-on-desktop-on-osx.html
http://ask.metafilter.com/24603/Temporary-downloads-in-Firefox-OS-X
http://www.zagz.com/pdf-files-left-by-firefox-on-mac-os-x-desktop/

People have gotten so desperate that they've resorted to Hex editing:

http://forums.mozillazine.org/viewtopic.php?p=3220730#3220730


To repeat: This feature makes firefox unusable for any nearly computer novice. 
It irritates almost every Mac user I know, to the point that many of them stick
to Safari to avoid the issue.  Is anyone at Mozilla listening -- what will it
take to get this issue addressed? 

Additional Comments
By the way.. in Leopard the Safari-trick doesn't work at all... so there is NO WAY  to alter the default behavior of cluttering the desktop.  This is a huge problem IMO.
Please don't cross-comment in multiple bugs. This one is marked as fixed. Please use bug 374184 for further comments. Thanks.
Hardware: Macintosh → All
Sorry for the cross post.  But, the point is that the problem is clearly not fixed and is marked so erroneously. Saying "Do file a bug on Apple, please.  ;)" does nothing to fix the problem users are having with this..
I think that as the filer of this bug, I have a pretty good idea of whether it's fixed or not.  If you have another issue that you think is not fixed, that's a separate bug.
Okay point taken :)
In response to comment #36, I'm with Boris.  Mozilla's behavior of littering my desktop with temporary files is incredibly annoying.  I don't consider an option to delete on exit a fix.  Temporary files ought be stored in a temporary directory.
(In reply to comment #38)
> In response to comment #36, I'm with Boris.  Mozilla's behavior of littering my
> desktop with temporary files is incredibly annoying.  I don't consider an
> option to delete on exit a fix.  Temporary files ought be stored in a temporary
> directory.

Please see bug 311292 which covers a change of the folder where temporary files are stored.
The deletion of temporary files on exit with the pref set to true regressed lately. The issue is covered on bug 460689.
This bug is not resolved and should actually be marked as a duplicate of bug
#311292
Product: Core → Core Graveyard

I'd like to confirm that littering the desktop with downloads is very annoying for user Joe Sixpack and that this is a severe nuisance, which undermines evangelism for the Mozilla family. I tried to instruct Firefox to use the /download order but that failed.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: