Jaguar test of shell script please

There have been some changes made in LaunchServices defaults on the upgrade from Jaguar to Tiger. On my system [10.4.4] this shell script returns the name of the default email client. Would someone running Jaguar tell me what it returns on their system? Guaranteed no harm done - it just reads and is likely to fail, if it does, with “”

do shell script "defaults read com.apple.LaunchServices | sed -n '/mailto;/{s/.*\\.\\(.*\\)\".*/\\1/p;}' "
--> "eudora" for my machine.

Hi Adam,

I get empty string “”.

gl,

Hi, Adam.

Same result as Kel’s: “” for Jaguar. But “powermail” for Tiger.

The Jaguar com.apple.LaunchServices file has no LSHandlers section. The mailto handler is listed under LSPrefsBindings:

I think this worked for Jaguar (and Panther?):

set dfb to read ((path to preferences as text) & "com.apple.LaunchServices.plist" as alias)
set x to offset of "<key>U:mailto</key>" in dfb
set dfb to text x thru (x + 800) of dfb
set x to offset of ("<key>LSBundleSignature</key>" & (ASCII character 10) & tab & tab & tab & tab & "<string>") in dfb
set dfb to text (x + 41) thru (x + 44) of dfb

On my machine it fails with “text x thru (x + 800)” highlighted. The message is fairly mysterious (just cut and pasted here, so not all characters come through:

10.4.4

Adam,

My machine returned “Entourage”

10.4.4

No need to thank me for my useless contribution, Adam. I just re-read your topic title… got confused when i saw other users reporting from 10.4.4.

So anyway - now that I have wasted everone’s time… :wink:

It turns out to be very difficult to reliably find out what the default applications are for mailing, browsing, and ftp. As delivered, Tiger defaults to Safari and Mail, but doesn’t record that anywhere. If you switch to another mailer or browser as your default, then an entry is made in LaunchServices, but that can appear in two places: the ~/Library/Prefs or the /Library/Prefs. Further, in 10.3.x the entries were different and and names were sometimes truncated. Ugh.

Thanks all for the tests.

I get an empty string on 10.4.4. I am using Apple Mail and have never changed the default mail client, so I guess the value is not defined by default.

Thanks Salli - turns out that it is not. I tried this on a pristine system and got the same results.

Yes. That was why I said “Jaguar” (and Panther?) :stuck_out_tongue:

Now, LaunchServices prefs changed (not only in structure -LSHandlers and so on-, but also in format, with the new binary-plist thing).