I have a MacBook that prints to a shared Windows 7 printer. Sometimes the Windows machine is asleep, and the Mac will just queue up its print requests. I recently created a script to send a wake-on-lan packet to a Windows 7 machine. This wakes up the Windows machine and printing starts. Great, but I think the system can be automated some.

Is it possible to have the MacBook run the wake-on-lan script everytime something is printed? Stated more generally, can I have the OS X print subsystem execute a script everytime something is printed?


As a possible alternative solution, consider installing Bonjour for Windows (including the Bonjour Control Panel) on your PC, and check the "Enable Wake on Demand" checkbox. Then, on your Mac, delete the existing print queue for your Windows 7 shared printer, and re-add it after finding it via Bonjour (so it knows to look for it via Bonjour from then on).

After Snow Leopard shipped, the Bonjour implementation for Windows was updated to support the client side of the Bonjour Sleep Proxy functionality. So once you install that software on Windows, when your Windows machine goes to sleep, the Bonjour (mDNSResponder) service on your Windows machine will ask the lowest-power Bonjour Sleep Proxy Server device on your network (i.e. your AirPort Extreme, Express, or Time Capsule if you have any of those, or your Snow Leopard Mac otherwise) to act as the sleep proxy for it, keeping its Bonjour-advertised services advertised on the network while it's asleep, and waking it with a Wake-on-LAN magic packet when anything requests that Bonjour-advertised service.

  • Spiff — I downloaded Bonjour for Windows, but it appears to only allow Windows machines to find printers shared by Macs (not to share Windows printers for Macs to use). BTW, sorry for the delayed reply. – Dean Hill Apr 20 '11 at 3:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.