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

10.5: Force FileVault to read Launch Services data System 10.5
There is a fairly significant bug when using FileVault in Leopard that as of OS 10.5.2 is still not fixed. Basically, when using FileVault, the LaunchServices database is not read properly when you login to your FileVault account after a system restart (not just a logout/login — a full restart).

The reasons why it doesn't work are a little shaky, but basically, OS X fails to read the LaunchServices database and simply reverts to default settings. This means that any changes you make to the default applications -- changing your default web browser, RSS reader, FTP client, or changing which application files of a specific type are opened in -- will all be reversed as soon as you restart. The changes are, in fact, still present in the database, but they are not being read by the system.

Now, obviously, Apple needs to fix this ASAP, and I encourage everyone to submit a bug report on it. Until this happens, however, there is a fairly simple fix to force the database to be read on login.

To fix launch services, enter the following command in the Terminal: This command must be run on every login. You can easily automate this using Automator, however. Simply launch Automator and select the Custom starting point. In the Actions search field, type Shell script, and drag the Run Shell Script action into the workflow pane. Paste the above command into the script window, overwriting any text already there. Save the Workflow as an Application and put it anywhere (I put it in /Applications/Utilities). Now, go to Login Items for your account and add the application you just created to your login items. From now on, the script will be run whenever you login, and all changes to your LaunchServices database will be properly loaded.

Note: I cannot personally take credit for this tip. The workaround comes from a this thread on the Apple Discussion Forums. Please remember to submit a bug report to Apple, even if you don't use FileVault. Apple seems to assign FileVault-specific issues a fairly low priority, and they need to know this is unacceptable.
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[18,232 views]  

10.5: Force FileVault to read Launch Services data | 13 comments | Create New Account
Click here to return to the '10.5: Force FileVault to read Launch Services data' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Force FileVault to read Launch Services data
Authored by: diamondsw on Mar 19, '08 08:35:05AM

Good tip, but please don't use this as a soapbox for your pet bug. You have LaunchServices issues you can work around - I have kernel panics coming from kernel firewalling code. Who should be prioritized here? Just file your bug and let them do their work.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: unforeseen:X11 on Mar 19, '08 09:32:12AM

Pet bug? Yes, kernel panics are more serious, but since we FileVault-users have to logout every time we want to have TimeMachine generate a backup, I have to log out daily. Imagine the pain it is to revert to my own default Apps every morning!

I must say I'm growing more and more disappointed with Apple, this is the kind of things that have just worked in previous systems (and I'm talking System 7.5+ here), and with Leopard, Apple introduced some very annoying bugs. GET YOUR WORK DONE, CUPERTINO!!!

---
this is not the sig you`re looking for.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: barefootguru on Mar 19, '08 12:11:45PM

This has been intermittently happening to me since at least Tiger, but it's always after rebooting, never on logout.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: Typhoon14 on Mar 19, '08 12:27:19PM

Yes, this does happen only on a reboot. This gives you lots of times to make many changes to the LaunchServices database, only to see them all fly away as soon as you have to restart for any reason. Fun!



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: unforeseen:X11 on Mar 19, '08 01:20:41PM

Yes, you're right, only on reboot. However, since SteerMouse stopped working for me after a logout/re-login with Leopard, Restarting is the only option I have in order to get my Backup... :-P

---
this is not the sig you`re looking for.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: Typhoon14 on Mar 19, '08 10:55:14AM

"pet bug"? This is a serious issue, and it occurs for anyone using filevault, not just in specific circumstances. When using a major OS function, another major function does not work. I do not know what firewall bug you're talking so I can't say how wide ranging it is. In any case, the two are not related. I want lots of people to tell apple to fix this bug so it gets fixed sooner. If you want the bug you speak of fixed, publicize it and get people to submit bug reports. Don't go around complaining that other people want apple to fix different bugs. This doesn't help anything and just makes people mad.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: johnsawyercjs on Mar 19, '08 12:45:04PM

As Typhoon14 says below, this is a serious issue, affecting other people too, so his tip is not a soapbox for his "pet bug". MacOSXHints isn't just for reporting ways to get OS X to do things that aren't always obvious--it's also for reporting fixes and workarounds for bugs. This tip isn't out of place or self-serving at all--it's using MacOSXHints in exactly the way it was intended.

It wouldn't be productive for him to keep the tip to himself, or just let it appear in Apple Discussions, or disappear into the Apple bug reporter, to maybe get fixed some day, while people who need the fix simply wait. If you have kernel panic problems, see if you can figure out, or if someone else has, a fix or workaround, and report it here and elsewhere. Nobody will blast you for it--they'll thank you. There's no issue of "prioritization" in tips, bugs, etc. submitted here on MacOSXHints.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: michelcolman on Mar 20, '08 01:07:45AM

This bug deserves to be fixed asap, as it does affect many users. It used to affect me too, before I switched to a non-FileVault account with a seperate encrypted disk image that holds my mail and personal stuff. I never figured out it had something to do with FileVault.

It's apparently very easy to fix, too, so it will take an Apple engineer maybe 5 minutes before he starts working on your pet kernel panic bug ;-)

So it deserves to be bumped up a little by multiple bug reports. Which would you do first?

- Major bug that affects one user and may take days or weeks to figure out, let alone fix.
- Minor bug that affects lots of users and takes 5 minutes to fix.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: mjb on Mar 20, '08 03:27:36AM
Just because the workaround is 'easy', doesn't mean that the correct fix will also be as easy. It will most likely take an apple developer significantly more than 5 minutes.

[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: Typhoon14 on Apr 02, '08 08:10:43PM

Now, there is one thing this does not fix, and that is the fact that the "this is the first time you've run this application" dialogs will appear every time after you logout or restart. For any appication not used prior to activating filevault. I believe these messages to be handled by the launchservices database as well, but for some reason this hint does not effect them.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: loren_ryter on Mar 20, '08 07:08:19AM

Bugs should be made widely known no matter what they are. In Apple's rush to get new products out they have caused a lot of problems, and Leopard is absolutely full of them.

As for FileVault, this is a nice tip for those who use it. But let me say also that FileVault has NEVER worked properly. As a developer, I had in the end to make one product simply incompatible with FV and disallow it because the work around was way too slow. Under the hood, it's just not a transparent system as it should be when you are logged in securely.

If you really need an encrypted disk, try PGP or similar.



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: Typhoon14 on Apr 16, '09 11:58:57PM

I completely agree. Unfortunately, as PGP Desktop does not do partition-level encryption, it is not possible to use it and Boot Camp on the same machine. For me, this forces me back to FileVault for the time being. Here's hoping PGP implements this functionality soon (the Windows version has had it for ages).



[ Reply to This | # ]
10.5: Force FileVault to read Launch Services data
Authored by: kopischke on Jul 03, '09 05:09:45PM
There is a problem with the brute force solution of resetting Launch Services data: besides re-reading the Launch Services bindings stored in the user's com.apple.LaunchServices.plist it will, among other things, also reset the cache storing the "safe" flag for applications that install protocol handlers (quite a lot of OS X apps do, I'll only mention Evernote, Pukka, Bwana...), which will result in the first call to the app or protocol triggering a "You are opening this application for the first time" alert. Resetting at every login means also dismissing this alert again every time, which is annoying. There are ways around this too, but they involve even more intrusive system tinkering (see the following Apple discussion thread, esp. pages 3 to 5).

The alternative is to sidestep the issue and not reset Launch Services at all, but to only selectively re-read the user's Launch Services bindings. lsregister won't help there, but with a bit of tinkering Andrew Mortensen's duti will. For everybody's convenience, I have created a shell script (with a few supporting files) that will do that exactly, adding a few extras like registration as a LaunchAgent. It's called GoodCompany (because it keeps your associations, and goes well with FileVault), it's free and it's available here (the tr.im shortened link is for statistical purposes only, as it helps me keep an eye on download numbers; if that bugs you, the original link is https://good-company.s3.amazonaws.com/GoodCompany.zip). You can keep an eye on the hash tag #GoodCompany in my Twitter stream to keep abreast of updates.

[ Reply to This | # ]