1

I have a USB printer, connected to a network print server (TL-PS310U).

I want to print from Debian/Ubuntu to this printer. The queue is named 2409ee3c, but when I try to use lpr, it says that I need to add /version=1.1:

user@user:~$ lpr -H 192.168.100.1 -P prt0 C0003022.che.spl 
lpr: Error - add '/version=1.1' to server name.

Then I added the printer in CUPS (http://localhost:631) as lpd, with name Printserver:

lpd://192.168.2.30/2409ee3c

And I now can print with LPR:

user@user:/run/shm$ export CUPS_SERVER=localhost:631; lpr -H 192.168.2.30 -P 2409ee3c C0003022.che.spl 
lpr: The printer or class does not exist.
jsivil@jsivil:/run/shm$ export CUPS_SERVER=localhost:631; lpr -H 127.0.0.1 -P Printserver C0003022.che.spl 

My questions are:

1) Can I print with LPR directly to this printer behind a printserver? (I've tried netcat but it doesn't work for this printserver)

2) Does LPR need CUPS? Is it OK to use 127.0.0.1?

3) How can I avoid having to export the CUPS_SERVER variable prior to use lpr?

Thanks

JorgeeFG
  • 725
  • 2
  • 9
  • 17

1 Answers1

4

netcat could be used, though you'd need to send appropriate LPD commands over it. rlpr is doubtless a better option for direct printing than figuring out how to do RFC 1179 over netcat.

The CUPS lpr client does need a CUPS server, as the CUPS server does the heavy work, and the client portion is mostly just a compatibility shim for the traditional lpr or lp command line interfaces.

CUPS has a ~/.cups configuration directory that might be used instead of an environment variable, though I do not recall needing to set CUPS_SERVER where the print server was on the local system:

% ls ~/.cups/           
lpoptions
% cat ~/.cups/lpoptions          
Default ps307g
% 
thrig
  • 34,333
  • 3
  • 63
  • 84