OK, following or trying to follow, Wayne's advice, I am attempting to use
lp -d star temprint.txt.
to print to a raw printer. It does not work. My user account is in the lp group, the printer is set up as raw in cups, and it is named star.
When I do
lpstat -P star
all the jobs have piled up there one after the other, and can be cleared by lprm. There are no failure messages however.
I have tried
lp -P star -o raw
But it seems to not recognize the raw option and to only expect page numbers.
On the other hand,
cat temprint > /dev/usb/lp0
works just fine.
If you use cat as above, there is a real risk as Wayne pointed out. If the printer is offline, then its true, the application freezes. This is not desirable at all. Though, its a pretty robust printer, so maybe this is a chance I have to take. And maybe I could provide some kind of choice to just turn off the printing command and clear the queue and tell the user to call for assistance. But it is not good at all. Its a disaster waiting to happen.
So it would be nice to be able to use lp. But how? And does anyone have any suggestion why it might not be working or what to check?
I also cannot figure out, despite much googling, how to test for whether the raw printer is on line and functioning. Nothing I have tried gives any different result if it is powered on or off.
Peter