Printing from a Windows box via samba to CUPS
This little fix had me stumped for several hours. From a windows box, printing to a samba server using CUPS gives no joy. Windows has it's own drivers, so it will send raw printer instructions to CUPS, expecting these to be passed directly to the printer. CUPS usually expects to be able to do the data conversion itself using it's drivers, using a set of mime-types to recognise incoming jobs, and translating them to the proper printer language on the way, be it postscript, bubblespeak or whatever your particular paper-chomping animal speaks. CUPS seems to ship (on RedHat / Fedora at least) without support for application/octet-stream support. Is it just me, or is octet really hard to type?
Anyway, enabling binary data is really simple, once you know how. Edit your CUPS mime.types file (/etc/cups/mime.types on my system) and uncomment or add the following:
Hardly brain surgery there. Now using your favourite editor again, crack open /etc/cups/mime.convs and feed it the line:
application/octet-stream application/vnd.cups-raw 0 -
This tells it to simply pass the data through. Restart cups (service cupsd restart or similar) and try printing again - hopefully you'll either get a page, or some other weird error message - but at least you got an error this time, rather than a silent failure. You're on your own now, 'cause this much worked for me.