Can't modify .plist with defaults or plistbuddy

Hi.


I have to modify all the printers of my works to print in B&W and duplex.

No problems to do this on my 200 macs with lpadmin.


But i can't modify the option « Reset Presets Menu to « Default Settings » After Printing » int he preset area of each user.

If this box is not checked, the preset color that the user has created will be retained the next time ... which screws up the whole operation.


I don't know how to change this in cli.

In gui, I check the box in printing windows and I read the pref file :

defaults read ~/Library/Preferences/org.cups.PrintingPrefs.plist


{

"com.apple.print.preset.defaultToStandardPreset" = 1;


}


Unchecked the box in gui :

{

"com.apple.print.preset.defaultToStandardPreset" = 0;


}


When i do the same thing with the defaults command

defaults write ~/Library/Preferences/org.cups.PrintingPrefs.plist com.apple.print.preset.defaultToStandardPreset 1

If I read the pref file, the change been made.

defaults read ~/Library/Preferences/org.cups.PrintingPrefs.plist


{

"com.apple.print.preset.defaultToStandardPreset" = 1;


}


The box is still unchecked

same thing with the plistbuddy command … same result.

/usr/libexec/plistbuddy -c "Print :com.apple.print.preset.defaultToStandardPreset" ~/Library/Preferences/org.cups.PrintingPrefs.plist

False


/usr/libexec/plistbuddy -c "Set :com.apple.print.preset.defaultToStandardPreset true" ~/Library/Preferences/org.cups.PrintingPrefs.plist


/usr/libexec/plistbuddy -c "Print :com.apple.print.preset.defaultToStandardPreset" ~/Library/Preferences/org.cups.PrintingPrefs.plist

true


I also tried to empty the preferences cache "killall cfprefsd".


I don't know why he don't want to apply this setting in cli…



Thanks you for your help.

Have a good day.

Posted on Apr 4, 2016 3:12 AM

Reply
1 reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Can't modify .plist with defaults or plistbuddy

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.