Closed Bug 74247 Opened 25 years ago Closed 24 years ago

Fizzilla should store profiles in $HOME/Library/Mozilla

Categories

(Core Graveyard :: Profile: BackEnd, enhancement)

PowerPC
macOS
enhancement
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.2

People

(Reporter: mozilla.org, Assigned: ccarlen)

References

Details

(Whiteboard: OSX++ [patch should take a few hours max])

Attachments

(1 file)

Linux uses $HOME/.mozilla to store profiles. Mac OS 9 uses a "Mozilla" folder in the "Documents" Folder. Fizzilla (Mac OS X) uses $HOME/Documents/Mozilla. Mozilla profiles aren't really "documents," so maybe Fizzilla should follow Unix and use $HOME/.mozilla to store profile information. Mac OS X home directories also have a $HOME/Library/ directory that other applications are using to store application data. Problem with $HOME/.mozilla is that it is not visible to users using the GUI Finder. Apple developer docs for Mac OS X probably provide further guidance on where to store application data.
Keywords: correctness
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.1
I'll try to find out where the reccomended location is.
there will be no ".mozilla" on macos of any variety. bad geek! bad! bad! no cookie for you! Documents is a valid location for all flavors of macos. recommend WONTFIX
Fair enough; $HOME/.mozilla is no good. But how about somewhere in $HOME/Library? Just because the "Documents" folder exists on both Mac OS versions doesn't seem to me to be a good enough reason to keep profiles there. To me, "documents" means files that the user creates, edits, or views directly. Mozilla profiles contain just about everything but "documents." Also, Mozilla Classic uses /Documents (root level), while Mac OS X Mozilla uses $HOME/Documents. So it's really not the case that the current profile location is uniform across Mac OS versions. Instead of marking this "won't fix" right away, how about leaving it open for further comment?
Turn on multiple users under Mac OS 9 and you'll get multiple instances of the Documents folder (stored in the Users folder I believe)
And we'll create a separate "Mozilla" folder in each one of them (which is the right thing to do) without even knowing it. The Folder Manager hides this from us. Back to OSX: Using $HOME/Library/ is probably right since that's where Apple's own mail client sticks its accounts folder. If Apple programs are the true Romans...
I agree that the '/Home/<User>/Library/' directory would be the best place to store the Mozilla profile/data folder. It keeps the user's Documents folder clean, and it's the directory where users expect to go to clean up preferences and application data files. Maybe in the future you can get extravagant and use the '/Home/<User>/Library/Caches/' directory for the cache files and '/Home/<User>/Library/Internet Plug-Ins/' for plug-ins, but this is a good start.
*** Bug 74939 has been marked as a duplicate of this bug. ***
Tonight I managed to find an excellent guide to the Mac OS X filesystem in Apple's Tech Publications. http://www.devworld.apple.com/techpubs/macosx/SystemOverview/SystemOverview/FileSystem/How_the_Fil_s_Organized.html According to this document, the proper location for Mozilla's stuff would be: ~/Library/Preferences/Mozilla/ Within Mozilla/, everything could be stored. This would make it easy on a user by user basis to modify their Moz installation, or even throw out the folder and start over. I think this structure would keep things tidy, without forcing us to search all over the filesystem looking for preference, cache, and other files in random directories. - Adam
We should use the ToolBox call FindFolder and pass in kPreferencesFolderType to find the preferences folder. This works on Mac OS X, Mac OS 8, Mac OS 9 single user and Mac OS 9 multiple user, as far as I know. See this technote: http://developer.apple.com/technotes/tn/tn1186.html I dunno why we use the Documents folder at present. Netscape 4 didn't. I'm guessing someone made a decision to increase the discoverability of profiles at some stage? There should be a constant for this folder somewhere too.
I think ~/Library/Mozilla is a better place than the preferences folder. Other applications (incl OmniWeb) use the Library folder. Mozilla profiles aren't really preferences files, anyway. See http://www.devworld.apple.com/techpubs/macosx/SystemOverview/SystemOverview/SoftwareConfig/iThe_Preferences_System.html "The assumption with user preferences is that they are not critical; if somehow they are lost, the application can recreate the default set of preferences."
Summary: Fizzilla should store profiles in $HOME/.mozilla or a subdirectory of $HOME/Library → Fizzilla should store profiles in a subdirectory of $HOME/Library
I agree the Mozilla folder shouldn't go in prefs, which is why we moved it into Documents in the first place. ~/Library seems like a valid place, but under no circumstances should it go into ~/Library/Preferences
So does one consider their downloaded mail to be "preferences" or "documents"? The latter is one of the arguments that drove the Mozilla profile folders into the user's Documents folder.
Mozilla profiles are not "preferences" or "documents." You don't have just the Preferences folder and the Documents folder to choose from. I think ~/Mozilla or ~/Library/Mozilla would be better than either one.
I don't consider mail to be either preferences or documents. Ditto with web and news cache. ~/Library/ is a better place for it, IMHO. Mac OS X has multiple user support in the OS; is multiple-profile support in Mozilla really necessary? Mozilla stores stuff that are clearly preferences in ~/Documents/Mozilla/*. Things like bookmarks, cookies, history, etc, are all preferences, and as such, belong in a preferences folder. I think a lot of users are going to see things this way. You have to go three directories deep into ~/Documents/Mozilla/ before you get to real content. Most users aren't going to bother doing that; they'll think to themselves, "Ok, I didn't save any mozilla documents. Why do I have this umpteen-meg directory here, then?" and delete it. And then, *poof*, there go their preferences. Mozilla ought to do what OmniWeb does - stick everything in a subdirectory in ~/Library/. And clean up the structure, so when people open the Mozilla folder, it's pretty obvious that it contains important stuff. ~/Mozilla/ should definately not be used. That's like dumping your junk on my front lawn. I like my home directory to be clean.
what if I, as a user, want multiple browsing prefs w/in one account? One for pr0n surfing and another with all my normal work bookmarks. Can't create two users, because I don't own the box, etc etc.... it still makes sense.
Summary: Fizzilla should store profiles in a subdirectory of $HOME/Library → Fizzilla should store profiles in $HOME/Library/Mozilla
Apologies. My main point was to ask people to use FindGolder rather than paths. Just because paths are now possible because Mac OS X is Unix doesn't mean we should take a step back and actually use them. If there's no FindFolder constant for ~/Library at present, then please try to find one for ~ and make a simple one hop path. This *is* important. When Apple introduced multiple users on Mac OS 9 applications that used FindFolder to save their prefs files kept right on working without any changes. Similarly, Apple localise folder name. On Classic Mac OS System Folder becomes Dossier System (apologies I dunno where the accents go). Mozilla profile's aren't prefs, this is true. The contents also isn't terribly interesting. About the only thing that's editable in there is prefs.js I believe. If possible we should seperate the things that can be recreated (MozRegistry.dat, prefs.js etc) from those that can't (primarily email). That way people can delete their preferences without destroying anything important. But failing that I agree with Mike. Don't put it in preferences.
> Mac OS X has multiple user support in the OS; is multiple-profile support in > Mozilla really necessary? Yes. With multiple user support in the OS, how long does it take you to logout of one user and the start over as another? It's a royal pain. As far as the data in a profile dir, I'd say that not even prefs.js is disposable. You'll lose all your mail account info. For that reason, we should keep it away from prefs. I think the data should go in <User>/Library/Mozilla. That would make it clear to people that this data is not prefs, and it would not litter their Documents folder. We just need to know the proper way to find the <User>/Library dir.
Metooing ~/Library/Mozilla/. (Not had-coded in English, of course.) However, the cache is disposable and could therefore go in ~/Library/Caches/Mozilla/.
here's how to find ~/Library SInt16 vRefNum; SInt32 dirID; OSStatus err = FindFolder(kUserDomain, kDomainLibraryFolderType, true, &vRefNum, &dirID); (thanks to correia@barebones.com)
Thanks - ~/Library it is. Where are kUserDomain and kDomainLibraryFolderType defined? It's not in Univ Interfaces 3.3.2.
they must require later headers.
I'm a Mac OS X user, as well as a consultant responsible for the upkeep of many Macs at many different businesses. I want my job simple. In a perfect world, there would be a Library folder in OS 9 that could be discovered thru the previously mentioned FindFolder routine. But there isn't. I tell my users to save Documents in their Documents folder. In OS X, it's even one of the items listed in the mini save pane attached to windows, when you're not viewing the entire directory structure. This makes users' lives easier. If a user is sorting thru their Documents directory, and they come across a Mozilla folder that they didn't make, they would probably figure it was trash and delete it. This is the reason I hate having Moz for OS 9 save its prefs & config files here. In OS X, the Library folder makes perfect sense. If we decide to save here, we can use system variables to locate the actual directory names. http://www.devworld.apple.com/techpubs/macosx/SystemOverview/SystemOverview/FileSystem/How_the_Fil_s_Organized.html#BAJBJHFD The annoying thing about this is that then we have one location where this type of data is saved in OS 9, and a different location in OS X. Not terrible, but less than perfect. Mike, you mentioned, "I agree the Mozilla folder shouldn't go in prefs, which is why we moved it into Documents in the first place. ~/Library seems like a valid place, but under no circumstances should it go into ~/Library/Preferences". Why? I searched Bugzilla, and cannot find anyone else reporting this as a bug, or any comments on this issue. I'm afraid I don't understand why System Folder: Preferences: Mozilla under MacOS 9, and ~/Library/Preferences/Mozilla under X are so bad? The good thing about this location is that it's similar on both OS versions, and Preferences is properly dealt with under Multiple Users in OS 9 and OS X. We're also not shoving a folder full of configuration junk in front of users who really don't wish to see such stuff. Even Linux hides it by naming with a leading period. Even they wouldn't stick this right in the user's face. If Mozilla only ran on OS X, I'd agree that ~/Library/Mozilla is the right spot. But since Moz runs on OS 9 too, I'd suggest that we move this folder to ~/Library/Preferences/Mozilla . Depending on the outcome of this bug, I may file another electing for the similar change to OS 9. One last thing: Mozilla does not explode if you drag the Mozilla folder to the trash. That's what the comment in Apple's tech pubs was mentioning. Items in the Mozilla folder set "prefs" (of a fashion) for the particular user account logged in at the time. Makes a heck of a lot more sense to me to file this in "Preferences" than "Documents". - Adam
adam, what you seem to be overlooking is the fact that dragging things in prefs to the trash should not result in significant data loss for the user. Dragging the "Mozilla" folder to the trash will result in _significant_ data loss, especially if they use POP mail. Mail? gone. Bookmarks? gone. What could be worse?
Another way to look at this is that trashing the Mozilla folder sets Mozilla back to its defaults; it once again asks you for setup info, as if you just installed it. Other apps that have their Prefs files thrown out might also return to default settings. Since there is no "Library" in OS 9, and for sake of simpliciy, I'd say return the Mozilla folder to Prefs. Netscape used the Prefs folder for years; I don't remember hearing any complaints about it. However, I find the Documents folder an obnoxious location for the Mozilla folder. Mike, obviously you've got a concern in mind. What was the big internal debate that led to moving this to Documents? - Adam
adam, i just told you. read my comment dated 2001-04-12 13:50. Major data loss is the problem.
I just checked Folders.h from UI 3.4. The constant for the libraries folder is meaningless on Mac OS 9 according to the comments. I was going to suggest the Application Support folder, because that exists on Mac OS 9 and Mac OS X, but I realised its not multi-user on either OS. So I looked at what folders are multi-user on Mac OS 9 and came up with only Documents and Preferences as possibilities. (there are others, but they're things like Apple Menu Items). :( Looks like leaving things in the documents folder on Mac OS 9 is the way to go. In which case we should rename the folder "Mozilla Profiles" or even "Mozilla Profiles And Email" to make it clearer to people what they might be about to trash. The fact its just "Mozilla" (or "Netscape") is a part of the problem, I think.
We certainly don't have to do the same thing on OS9 as OSX. A simple check for which system we're running and we can act accordingly. My opinion is still that /Home/<User>/Library/Mozilla is the way to go for OSX and Documents/Mozilla is best for OS9. I think lordpixel's idea that we change the name of this folder to something that the user will be less inclined to trash is good. Having the name of this dir change causes some problems for directory service and profile mgr, but none too impossible.
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Whiteboard: OSX+
-> 0.9.3
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Mozilla settings such as bookmarks are really equivalent to documents, hence the decision was made to store user visible data in Documents. I wouldn't be against storing less critical settings in ~/Library/Preferences, but I see no reason to change our use of the Documents folder. Not that this is a good precedent, but Microsoft Office creates a "Microsoft User Data" folder in the Documents folder on OS 9.
I think I made this point two or three times in earlier comments, but it seems to have not gotten through: Mozilla profiles are not "documents." If you think they are, you've been working with computers too long. I use my documents folder to store actual documents (letters, papers, resumes, spreadsheets, etc.), and I could do without the clutter in the documents folder. If you don't want to change the default location, how about letting the user select (at install time) the location for the profiles folder?
> My opinion is still that /Home/<User>/Library/Mozilla is the way to go for OSX > and Documents/Mozilla is best for OS9. My opinion still has not changed ;-) This is what I'm doing.
beta stopper. we should get this fixed before we go with a wide distribution if we plan on changing it from what it is now (which we do, sorry beard).
Whiteboard: OSX+ → OSX++ [patch should take a few hours max]
The patch does the job. Tested under 9 and it used the Mozilla folder in Documents. Under OSX, it made a Mozilla dir in $HOME/Library and all was well. Bear in mind that if you have a Documents:Mozilla that you've been using on a machine under 9, this will make no attempt to recognize it, migrate it, or anything clever like that. OS 9 and OS X are considered separate worlds - although you may be able to trick it with an alias.
Target Milestone: mozilla0.9.3 → mozilla0.9.2
r=pink. is there no better way to gestalt for this than checking the system version against 10? I guess not, but in case there is we should try to find it.
Checking the system version is icky but, looking in Gestalt.h at the various selectors for Folder Manager, I can't see a more specific test.
Simon, can I get a sr of this?
sr=sfraser
a= asa@mozilla.org for checkin to the trunk. (on behalf of drivers)
Blocks: 83989
In doing testing before checking this in, I ran into a horrible new problem. Basically, if the profile mgr dialog is not shown when starting up, the program will hang. The problem happens whether this patch is in place or not on a tree pulled this morning. The reason this makes me hesitant to check this in is that, when starting the program for the first time with this code in place, there will be no profiles, so the profile mgr dialog will not be shown, and the program will hang. This is only the case with the Carbon build on OS X and I think it's a new problem. I never ran into this in the testing of this code before.
Fix checked in. If you want to keep using profiles in the old location (share the profile with a classic build), this works: When mozilla creates %HOME/Library/Mozilla for the first time, quit, delete the contents of the new Mozilla dir, copy "Application Registry" from the old location (or alias it preserving the name), and it'll use the old profiles.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Marking verified in the June 13th build (2001061314)
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: