Tuesday, February 4, 2014

Rambling 2014/6 - DOSEMU and the USB-LPT printer


DOSEMU on a Xubuntu, running an MS-DOS application, that would like to print to LPT1. All fine, but what happens if you don't have a parallel port on that PC?


We happened to have a Xubuntu machine and an old Epson LX-300, but the PC did not have any LPT ports. So the only way to connect them was via an USB-LPT connector. With that inline, the system did see the Epson and printed anything.
However, the old MS-DOS application that runs in DOSEMU did not print anything. In fact, it printed but the bytes did not get to the printer.


The solution was hacking DOSEMU config (/etc/dosemu/dosemu.conf)
In the section "Printer and parallel port settings" there are several lines of lpr blahblah command, all commented out. Take the first one and edit it to include the name of the printer (you can find it on the CUPS config webpage localhost:631), right after the -P option. So the line now looks like:
$_lpt1 = "lpr -PEpson-LX-300+"
Save it and collect all acknowledgments :)