Reset Preset Menu to "Default Settings" After Printing - Command line or plist setting?

rgerman
Contributor

I have been requested to make two sided black and white the default print option for our Xerox Printer. I was able to accomplish this and add some handy presets for the user to select other options like 1 sided and color.

What I have found is unless I open the Show Presets... option and check Reset Presets Menu to "Default Settings" After Printing... Print jobs will use the last preset selected by the user... so if they selected color... the next job will print color as well. Selecting the option above does just what it says and reverts to the default after each print job.

My question is... is there a plist or a command line flag to check this box? I did not see anything in the plist file for the printer or in lpadmin.

Any assitance would be greatly appreciated.8cfb3f96fdd148e794ee7953c1938498
3bc1cfc484f64e9ca28ae84827b4e0ed
ceff008dbf4242469ef51006614d2cf3

1 ACCEPTED SOLUTION

rgerman
Contributor

With the help of Jake from JAMF support we were able to work out the solution.

Simply enter the exact command below in terminal
defaults write ~/Library/Preferences/org.cups.PrintingPrefs.plist com.apple.print.preset.defaultToStandardPreset -bool true

This will check the box... if you want to uncheck the box... change the last word in the command to false.

No restart needed... it worked like a charm! Huge time savings! Kudos to Jake at JAMF support!!

View solution in original post

4 REPLIES 4

rgerman
Contributor

I was able to narrow down where this setting is written.
~/Library/Preferences/org.cups.PrintingPrefs.plist

There is a line - <key>com.apple.print.preset.defaultToStandardPreset</key>
<true/> The Reset Preset Menu to "Default Settings" After Printing is set to <true/> when checked and set to <false/> when unchecked. When changed in the GUI

The default setting of printers is always unchecked.

I tied running the command... defaults write ~/Library/Preferences/org.cups.PrintingPrefs.plist com.apple.print.preset.defaultToStandardPreset true
Which does rewrite the preference file changing boolean <true/> or <false/> depending on my input but it does not change the settings in the GUI. So I am guessing the setting must be cached somewhere or a daemon needs to reload the preference file.

Any guru's out there know a way to get the preference file to reload? I'd like to do everything from the command line.

Thanks in advance,
Ray

rgerman
Contributor

With the help of Jake from JAMF support we were able to work out the solution.

Simply enter the exact command below in terminal
defaults write ~/Library/Preferences/org.cups.PrintingPrefs.plist com.apple.print.preset.defaultToStandardPreset -bool true

This will check the box... if you want to uncheck the box... change the last word in the command to false.

No restart needed... it worked like a charm! Huge time savings! Kudos to Jake at JAMF support!!

happyfan
New Contributor

Thanks for the scripts, it works when I copy and paste in terminal. But it doesn't work when I create a script in Jamf and install by self service. What's should I do to not allow user to untick this box?

bcrockett
Contributor III

Are folks having luck with this work flow on macOS 12.6? I get permission denied when trying to execute it in the terminal. 

As supper users the error is as follows: 

sh: /var/root/Library/Preferences/org.cups.PrintingPrefs.plist: No such file or directory