Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
$ lpstat -p
printer Canon_MG2100_series is idle. enabled since Sun 23 May 2021 02:23:23 PM EDT
printer EPSON-TM-P2.01 is idle. enabled since Fri 07 May 2021 12:08:25 PM EDT
printer EPSON-TM-P2.01-2 is idle. enabled since Mon 10 May 2021 02:31:25 PM EDT
printer EPSON-TM-P2.01-3 is idle. enabled since Fri 14 May 2021 12:25:23 PM EDT
printer Generic-Text-Only is idle. enabled since Mon 10 May 2021 02:54:34 PM EDT
printer MG2100-series is idle. enabled since Sun 23 May 2021 02:22:30 PM EDT
printer printer is idle. enabled since Sun 16 May 2021 01:58:48 PM EDT
printer queue_name is idle. enabled since Fri 21 May 2021 10:27:02 PM EDT
printer queue_name2 is idle. enabled since Fri 21 May 2021 10:39:19 PM EDT
printer queue_print is idle. enabled since Fri 21 May 2021 11:33:53 PM EDT
Doesn't this suggest that I'm making some sort of error when I type the command: "lpr -P Canon_MG2100_series d00026-001" and I receive "unknown printer" ?
Before cups linux used the BSD LPD print system which had lpr and LP commands and cups repurposed those same utilities. It is possible that your lpr is not the cups-lpr program.
Did you install any other printing software on your system? maybe cups-bsd
I don't believe so. Is there any test to see if something came in with something else? As you can saw, earlier, I haven't even installed samba on this computer, which is a 32-bit Dell, running Mint 19.3 .
When I go to "printer" and choose "help," I see "system-config-printer" "1.5.11" "A CUPS configuration tool" "Copyright 2006-20012 Red Hat, Inc."
lp -d Canon_MG2100_series d00058-001
request id is Canon_MG2100_series-66 (1 file(s))
I also got the slow output thus:
Quote:
lp -d EPSON-TM-P2.01 plain.txt
request id is EPSON-TM-P2.01-69 (1 file(s))
although, in this case the printer symbol showed for several seconds a red triangle with and exclamation mark.
Also, the corresponding outputs appeared as files in /var/spool/cups , the Canon output being a pdf and the Epson a txt files, though the pdf file didn't have the ".pdf" suffix nor did the text file have the ".txt" suffix.
I assumed by that worked the printers actually printed something that looked ok?
The cups error logs might have something that might correlate with the red triangle.
The cups data files are just named as the job number. Just as a FYI linux does not care about extensions. Most applications use the meme type or the file magic number to associate programs with file types.
So the lpr utility is broken some how.
Here are some options:
You can create a cups back end that will convert PDF output to text and print to the Epson that bypasses the rastertoespx as posted above. With simple text it should work ok.
You can build your own POS program that creates a text file and then prints to the Epson.
Hi, michaelk,
Thank you, here. In as much as I would be using this with my POS, printing many receipts per day, let me ask if there is some sort of small spooler program that I could load when the computer boots that will print anything that appears in a specified subdirectory?
Thank you,
Wayne
inotify tools allow you to monitor a directory for changes and incron is an easy way to use them. Basically when anything is written to the specified directory it will trigger the system to run commands which would be to print a file.
Thank you, michaelk,
I will look into this.
Interestingly, I purchased a USB to parallel cable. After I connected the printer with it, cups detected my printer. I was able to add a printer. When I clicked on the test printer button, the printer started printing very quickly, which is good, but inserted an extra space at a regular basis, so that images and even some lines of text were broken, the tops of letter and the bottoms separated by about 1/8". Do you, by any chance, know how to close that gap? Also, is there any way, that you know, for dosemu to direct its lpt1 output to a USB printer? I recognize that this question may be beyond the scope of this site, but, well, I figure I could ask.
Sincerely,
Wayne
Thank you, michaelk,
I added the line you suggest to dosemu.conf and the output was exactly as I wanted it. I'm guessing that the test file had things embedded that sent line feeds, or else that the default character set of the printer and the default output of dBase match. Anyway, now, using dBase on dosemu, I can generate receipts in a timely matter on a dot matrix printer. The only thing I don't know for certain is if the initial escape code will pass to the printer and trigger the cash draw, but it probably will because I see the escape codes in the file saved in /var/spool/cups . I'm concluding and guessing that Linux Mint 19 has problems with a generic parallel card.
I still have things to tinker with, when I'm feeling like it, but it works.
I appreciate all your patience and advice, and that of the other people at LinuxQuestions.org ,
Sincerely,
Wayne
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.