Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Preserve app preferences and settings when using FileVault System
I use FileVault to encrypt the contents of my home folder. In the case of my laptop being stolen or lost, the new user should therefore be unable (or find it extremely hard at least) to access my work and personal confidential data.

FileVault is very powerful, but it has a downside: FileVault loses some of my file associations and related preferences each time I log out, restart, or shutdown. For example, my preferred browser is Firefox, not Safari. Therefore, every time I log in, I have to reset the Firefox to be my 'Default web browser' in the Safari settings dialog.

Since OS X v10.4, this behaviour has been driving me to distraction. This is a known problem, and has been widely reported by FileVault users (see this hint, for instance). I was hoping that this would have been fixed with 10.6.2, but alas, the problem continues. So I set out to solve it.

Under OS X, file associations are saved on a per-user basis (as opposed to some other OSes), in a Property List (plist) file named, which is stored in your user's Library » Preferences folder. This file appears to be rebuilt upon each login, so any file association settings created during a session are effectively lost the next time you log out and back in again.

However, if you don't mind all local users sharing the same default associations as yours, you can copy this file (after you've applied the right associations, of course) to the /Library/Preferences directory. You can do this by copying or moving the file in the Finder, or if you prefer the command line (Terminal), with:
cp ~/Library/Preferences/ /Library/Preferences/
Upon a restart, you should now notice your settings are now working properly. Interestingly, it appears the local user plist file is regenerated by copying the contents (if any) from the /Library/Preferences/ directory. It is a simple workaround, but it seems to do the job. Apologies if you've seen this before, but I haven't found this information anywhere else.

[robg adds: I don't use FileVault, so I haven't tested this one. I added the reference to the prior hint, as they seem closely related, though that hint mentions the problem should only occur on a reboot, not after a logout.]
  • Currently 2.24 / 5
  You rated: 5 / 5 (17 votes cast)

Preserve app preferences and settings when using FileVault | 8 comments | Create New Account
Click here to return to the 'Preserve app preferences and settings when using FileVault' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Preserve app preferences and settings when using FileVault
Authored by: Alrescha on Nov 23, '09 07:51:58AM

For what it's worth, I'm on 10.6.2 and do not have this problem.

I have very few customizations, but I have associated VLC with AVI files, and do not have to redo it after a logout or restart.


[ Reply to This | # ]
Preserve app preferences and settings when using FileVault
Authored by: ragmaxone on Nov 23, '09 07:53:19AM

What about creating two little scripts to save this file before logout et restore it after? Would be more "clean" no?

[ Reply to This | # ]
Preserve app preferences and settings when using FileVault
Authored by: Typhoon14 on Nov 23, '09 09:30:30AM

As the submitter of the original hint referenced here regarding this problem, this issue seems to be fixed on all versions of Snow Leopard. Is the submitter using an installation that was upgraded to snow leopard (especially while FileVault was active)? This may have something to do with it. A clean install of snow leopard should definitely NOT exhibit this issue.

Actually, there seem to be quite a lot of improvements to FileVault in Snow Leopard. In addition to fixing this issue, login times is greatly improved (it used to absolutely crawl with FileVault enabled) and some general compatibility issues seem to have been fixed (for instance, some installer packages would not run properly with FileVault active on Leopard - all of these seem to work fine on SL though.)

FYI, the issue on Leopard was never that the launchservices database was actually getting reset, but that it was not getting properly read at boot time. If you open the actual file you should fine that all your user-set associations are still alive and well. What the system was doing was trying to read this file before the user directory (which is an encrypted disk image with filevault) had actually been mounted. This would result in an error and revert to the master database file.

Not to criticize the submitter here, but it still seems that my earlier solution is better. It doesn't force you to use one launchservices database for all users in fact, it as closely as possible duplicates what the system should be doing on its own.

Again though, if you are using OS 10.6, you should NOT be having this issue. This was a 100% reproducible issue on 10.5, but I have not over several installs been able to find this problem occurring in 10.6. My first suspicion is that the submitter did an upgrade install. I would highly recommend a clean install. Failing that, it is possible simply turning off filevault and activating it again will fix the issue.

[ Reply to This | # ]
Preserve app preferences and settings when using FileVault
Authored by: on Nov 23, '09 11:12:27AM

I've been experiencing this issue on 10.6 on a useraccount that was NOT using filevault.. the problems were exactly the same as with filevault on 10.5, and was extremely irritating. the problems did however seem disappear with the ugrade to 10.6.2 (I believe it came with 10.6.1, but I'm not sure), and I'm hoping it stays that way.

anyways, is the plist regenerated by copying the contents from /Library/Preferences/ every time you restart - even though there is no problem with the local plist? if so, this would be _extremely_ useful for users with several accounts either where only one of the users actually knows what he's doing, or where one user has several accounts. would save a lot of time setting up new accounts.

[ Reply to This | # ]
Preserve app preferences and settings when using FileVault
Authored by: zpjet on Nov 24, '09 01:48:24AM

hmmmm... i've used filevault on my work laptop since intel 10.4 and never had this issue

[ Reply to This | # ]
Preserve app preferences and settings when using FileVault
Authored by: Typhoon14 on Nov 24, '09 10:26:17AM

Is it possible you just haven't noticed? This may seem weird, but if you use Safari as your browser and don't restart your system a lot, it would be easy to overlook, or not make the proper mental link when you do find a file association that seems to have reverted. It took me about two months to fully figure out what was going on and to trace it to FileVault.

[ Reply to This | # ]
Preserve app preferences and settings when using FileVault
Authored by: kitebuggy on Nov 24, '09 02:16:49AM

Since the original submission of this hint some further information has come to my attention. Plus there have been some great comments here...

@Typhoon14, I hadn't read your original post properly, else my approach would have been different. Your interpretation of the bug is correct (file read of settings attempted before FV is mounted, hence fails to take these settings into account) and you're also spot on w.r.t. me having an upgrade installation rather than a clean install. Thanks for this tip, I shall give the clean install a whirl this evening.

@ragmaxone, thanks, your suggestion to copy the file back and forth at login/logout is an interesting one, but now somewhat superseded by Typhoon14's., my understanding is that the user's plist table is constructed from various sources. The lsregister command that Typhoon14 references in an earlier hint shows these sources as usage instructions when you run it without arguments, i.e. :


The sources are system, local, network, and user.

By editing the system plist for example (in the location in my original post above) would allow you to set default properties for a whole range of users, and that each user would inherit upon login. Please note that the user may also override one or more settings according to their preference, but the other settings would remain as set by you.

System administrators must also be able to set these settings across a range of managed machines, though this is beyond the scope of this comment and I will leave the 'how' as an exercise to the reader...

Thanks for all your suggestions and comments - this is what makes Mac OS X Hints so worthwhile for me! :-)

Edited on Nov 24, '09 02:22:42AM by kitebuggy

[ Reply to This | # ]
Preserve app preferences and settings when using FileVault
Authored by: barefootguru on Nov 25, '09 07:54:40PM

As per a couple of other posters I was plagued by this until 10.6, since then it's been fine.

Oddly enough my settings did revert right after upgrading 10.6.1 to 10.6.2. I hope it was a one-of!

(I submitted this as bug 6247025 and it was marked as a duplicate of 5071918)

Edited on Nov 25, '09 07:55:19PM by barefootguru

[ Reply to This | # ]