LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Printing management (command line cups) (https://www.linuxquestions.org/questions/slackware-14/printing-management-command-line-cups-375087/)

grautu 10-20-2005 11:16 AM

Printing management (command line cups)
 
Hello!
The aim: Using cups to configure my printer (which I call as my_canon) by command line only.
The suitable .ppd file is /usr/share/cups/model/C/bjc-7000.ppd (there is no .gz appended there since I've decompressed the former bjc-7000.ppd.gz file, just in case).
What went wrong After introducing the printer (according to CUPS administrator's manual <http://www.cups.org/doc-1.1/sam.html>) I asked for a test printing:
Code:

usr/bin/lpr -p my_canon /usr/share/cups/data/testprint.ps
Then machine's failing message was
Code:

lpr: error - unable to access "my_canon" - No such file or directory
If relevant, here is how I configured the printer.
Step1: making sure cups daemon is running
Code:

# /etc/rc.d/rc.cups start
Step2: Making sure there is usb device support
Code:

$ /usr/sbin/lpinfo -v | less
Step3: Introducing and enabling the printer
Code:

# /usr/sbin/lpadmin -p my_canon -m C/bjc-7000.ppd -v usb:/dev/usb/lp0 -E
Step4: Check the printer recording
Code:

$ /usr/bin/lpstat -v
device for my_canon: usb:/dev/usb/lp0

Step5: Check the job acceptance
Code:

# /usr/sbin/lpc status
my_canon:
  printer is on device 'usb' speed -1
  queuing is enabled
  printing is enabled
  no entries
  daemon present

Redundand check
Code:

# /usr/bin/lpstat -a my_canon
my_canon accepting requests since Jan 01 00:00

Now, where is my mistake if any? I mean which my_canon file is needed? Any hint is appreciated.
Thanks!

gbonvehi 10-20-2005 12:12 PM

Take a look at lpr's man page, to select the destination printer you've to use -P switch, not -p, like:
Code:

/usr/bin/lpr -P my_canon /usr/share/cups/data/testprint.ps

grautu 10-20-2005 12:58 PM

Quote:

Originally posted by gbonvehi
Take a look at lpr's man page, to select the destination printer you've to use -P switch, not -p
Right! I was taking that command (in its wrong form, with inline "p") not from the manual but from a tutorial.
Grateful thanks!

Okie 10-20-2005 01:55 PM

this is how i configure my parallel port HPDJ840 printer, this should work for most all parallel port printers...

edit /etc/rc.d/rc.modules and uncomment the two following lines: (or run em in a term as root (su))

/sbin/modprobe parport_pc

/sbin/modprobe lp

also make sure cupsd is running as a service.

then open your favorite web browser and from within your browser you can configure cups to your particular printer at this address http://localhost:631

name: Printer
Location: Local Printer
address: lpd://parallel:/dev/lp0
or...
DeviceURI: parallel:/dev/lp0

- - - - - - -

hope this helps


All times are GMT -5. The time now is 09:12 AM.