Aha! Success!
Didn't figure out the problem with the shell command but I worked around it by modifying the plist file for iCal in Library/Preferences, which is where the "defaults" command stores the goodies. Here is the outline:
- Quit Calendar
- Find the Property LIst file
- Make a backup copy of the Property LIst file on the Desktop, just in case you screw the next step up
- Edit the Property LIst file
- Restart the computer
- Open Calendar
For #2: in the Finder, Option-click the Go menu and click on Library; then navigate to Preferences and select "com.apple.iCal.plist". On my machine the full path of this file is
/Users/al/Library/Preferences/com.apple.iCal.plist
#3: Option-drag the plist file to your Desktop.
#4a: Open the plist file in Property List Editor. On my machine I just double-click and get PLE by default but I'm not sure that this is a standard app - it may be part of Xcode. If PLE doesn't open, you can try the same thing with a standard text editor like TextEdit or BBEdit - see #4b
In PLE you want to enter a new key. They seem to be in alphabetical order so I put mine right before a whole boatload of keys starting with "NS". So select the item before those and click on "Add item"
- Type "n days of week" in the "Key" column
- Select "Number" in the "Type" column
- Enter "14" in the "Value" column
(Actually, I put "10" in the Value column, but that's just me)
Save and close, and proceed to the restart.
#4b If you don't have Property List Editor, you should be able to accomplish the same thing in a simple test editor.
Oops! I'm going to have to take that back - I just opened it in TextEdit and got gibberish. Apparently the file uses a text encoding that TextEdit can't handle, and TextWrangler didn't work, either. It does look fine in BBEdit, though, and they have a free trial offer, I believe (
Bare Bones Software | Welcome)
Anyhow, here is what the relevant section of the plist file looks like in BBEdit:
<key>lastViewsTimeZone</key>
<string>America/Los_Angeles</string>
<key>n days of week</key>
<integer>10</integer>
<key>number of hours displayed</key>
<integer>16</integer>
Your job would be to add lines 3 & 4.