I can’t seem to locate the preference file that contains your default printer selection. We have about 40 accounts on each computer, a small utility for copying preferences to each of the users, but can’t seem to locate the file which contains the preference for your default printer selection.
Anyone know? I’ve tried all of com.apple.print.* , and spotlight isn’t helping any because it won’t search contents of plist files.
tell application "Printer Setup Utility"
activate
set myPrinters to every printer
set DefaultPrinter to current printer
if item 1 of myPrinters is DefaultPrinter then
set current printer to item 2 of myPrinters
else
set current printer to item 1 of myPrinters
end if
display dialog (name of current printer) as text default button 1 buttons {"OK"} giving up after 3
quit
end tell
For an individual account, these would both be splended. Unfortunately, I have 40 accounts on each of 70+ computers, so this wouldn’t be a very good solution…unless… dramatic music
Ok, here’s a thought. We -do- have Remote Desktop 2.0. I’m fairly certain I can run an Applescript via command line, no? So, I can send a Terminal command via Remote Desktop to all of the computers to execute your bit of script here via command line in order to set the default printer, right? If so, what’s the command in Terminal to execute Applescript code?
The file with the default printer is ~/.lpoptions
To set the default printer you have to type lpoptions -d printername. The user must be loged in on the remote machine in order to do this.
You can send the .lpoptions-File to every account on your machines. But you have to set the right ownership of the file to the user. rw-r–r-- Owner=user