"defaults write" problem Jaguar/Panther


I’ve written and released a script that uses ‘defaults’ to modify a plist. The script works fine in Jaguar but a user has contacted me advising that the script produces an error on his Panther machine. The reported error is “sh: line 1: defaults: command not found”. The highlighted code is:

do shell script "defaults write com.salling.SonyEricssonClickerHelper ShowStatusItem " & new_state

Can any of you Panther users tell me if if there were changes (going from Jaguar to Panther) that might cause this error to occur?


I think that the defaults command is part of the BSDSubsystem package. Check /Library/Receipts (ormanually see if it is in /usr/bin) to see if you have that receipt.

It works fine. I just wrote a do shell in one of my applescripts having to do with the defaults. Is this an application you wrote? Maybe the plist doesn’t exist yet on that clients machine? Try posting some more code so we can get a better look at it.

The source is available at:


The user has also reported that the script works occasionally so I guess that defaults is in place. I’m not sure what the problem might be as this is the first feedback on this script that I’ve ever received from anyone. It sounds like he has a local problem.

Thanks for attempting to help!

– Rob