This post will show you how to set up a USB receipt printer on Max OS X. These steps were written on Yosemite, but should work on 10.6 onwards (ie, also Snow Leopard through to El Capitan).
CUPS is the printing system that’s used on Mac, but most users would be more familiar with the system print dialog:
In our case, we need to set up the printer via the CUPS web interface. This is accessed via a web browser at this address:
At first, you will get knocked back:
To fix this up, open up Applications → Utilities → Terminal and type in:
You can then reload the browser and click through to Administration:
Click Add Printer and log in:
Select the USB printer from the list, and optionally share it:
Click Select Another Make/Manufacturer, and select Raw → Raw Queue:
Use the defaults for the other options:
Type some junk into a file called foo.txt and attempt to print it, using the CUPS printer name:
nano foo.txt lpr -o raw -H localhost -P EPSON_TM-T20 foo.txt
The prints will be delayed for a few moments, as CUPS spools the jobs.
Disable CUPS web
Once you’re done, for security reasons you should reset this option from before, to disable the web interface to CUPS: