kcrawford / dockutil

command line tool for managing dock items
http://patternbuffer.wordpress.com
Apache License 2.0
1.38k stars 131 forks source link

Not finding plist #20

Open Chriskmpruitt opened 10 years ago

Chriskmpruitt commented 10 years ago

Ok, so i have been messing around with dockutil for the passed few days. For the most part easy to use and works great.

So I am trying to modify the Default User Template dock plist. In the dockutil --help it says to use the '/System/Library/User Template/English.lproj' plist. But when i go there, i do not have that plist. So I grab the default plist found in /System/Library/CoreServices/Dock.app/Contents/Resources/en.lproj/.

And change it to com.apple.dock.plist, then push it out to the /System/Library/User Template/English.lproj folder.

Run the dockutil script and get this back

Script result: item Mail was not found in '/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist' item Contacts was not found in '/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist' item Maps was not found in '/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist' item Messages was not found in '/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist' item FaceTime was not found in '/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist' item Photo Booth was not found in '/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist' item iTunes was not found in '/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist' item iBooks was not found in '/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist' Microsoft Outlook already exists in dock. Use --replacing 'Microsoft Outlook' to update an existing item item /Applications/Microsoft Office 2011/Microsoft Outlook.app was not added to Dock Microsoft Word already exists in dock. Use --replacing 'Microsoft Word' to update an existing item item /Applications/Microsoft Office 2011/Microsoft Word.app was not added to Dock Microsoft Excel already exists in dock. Use --replacing 'Microsoft Excel' to update an existing item item /Applications/Microsoft Office 2011/Microsoft Excel.app was not added to Dock Traceback (most recent call last): File "/usr/sbin/dockutil", line 663, in main() File "/usr/sbin/dockutil", line 364, in main if addItem(pl, real_add_path, replace_label, position, before_item, after_item, section, displayas, showas, arrangement, tile_type, label_name): File "/usr/sbin/dockutil", line 516, in addItem if tile_replace_candidate[label_key_for_tile(tile_replace_candidate)] == replace_label: KeyError: None

I am running this in Postimage. My goal is to have the dock modify for new users.

ghost commented 10 years ago

per the result of your script it looks like you are trying to modify a plist that already has the changes you wanted (remove Apple apps and put MS apps instead).

seansgm commented 10 years ago

As posted on https://jamfnation.jamfsoftware.com/discussion.html?id=10991, you are trying to remove items that have no label. dockutil only refers to labels for all actions other than add.

Consider a feature request to be able to remove dock items that have no label.

kcrawford commented 8 years ago

Yes, this is an issue of not having a label for removal. You can do removals at/after login since they would have generated labels at that point.