Have OS X send wake on lan before printing to shared printer

4

2

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?

Dean Hill

Posted 2011-02-22T23:22:22.593

Reputation: 213

Answers

1

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

Posted 2011-02-22T23:22:22.593

Reputation: 84 656

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 – 2011-04-20T03:06:41.077