Serious question

I have a network printer
I have a command line only computer running
I want to print a text file

The printer has lpd on port 515, ipp on 631, and jetdirect on 9100

How do?
Do I need cups?


So I've ended up installing CUPS, and it Just Works (almost).

CUPS found my network printer immediately, which was a good start.

I then created a basic scipt to make it easier to print files, and saved it as /user/local/bin/doPrint, which means anyone can do
$ doPrint filetoprint

All it really does in munge the commands together:

enscript -p - $1 | lp -o media=A4 -o sides=two-sided-long-edge -d Brother_HL_L2360D_series

· · Web · 1 · 1 · 2

@M0YNG You can probably just use CUPS's lp or lpr command and ditch enscript since those two will interpret Postscript themselves.

The catch here is making sure you use CUPS's lp or lpr and not that of some other printing system. Which one gets used depends on which one is in a directory that's found first in your PATH variable. If your path is "/usr/bin:/usr/local/bin" and there's 2 lp commands, one in each directory, then the one in /usr/bin will get used.

@ND3JR ah, I did successfully print directly from a text file, but the font was large.
Via postscript it was fine.

Will have to check which version of lp I used.

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!