Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-20-2005, 11:16 AM   #1
Registered: Jul 2005
Posts: 139

Rep: Reputation: 15
Printing management (command line cups)

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 <>) I asked for a test printing:
usr/bin/lpr -p my_canon /usr/share/cups/data/
Then machine's failing message was
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
# /etc/rc.d/rc.cups start
Step2: Making sure there is usb device support
$ /usr/sbin/lpinfo -v | less
Step3: Introducing and enabling the printer
# /usr/sbin/lpadmin -p my_canon -m C/bjc-7000.ppd -v usb:/dev/usb/lp0 -E
Step4: Check the printer recording
$ /usr/bin/lpstat -v
device for my_canon: usb:/dev/usb/lp0
Step5: Check the job acceptance
# /usr/sbin/lpc status
   printer is on device 'usb' speed -1
   queuing is enabled
   printing is enabled
   no entries
   daemon present
Redundand check
# /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.
Old 10-20-2005, 12:12 PM   #2
Senior Member
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 51
Take a look at lpr's man page, to select the destination printer you've to use -P switch, not -p, like:
/usr/bin/lpr -P my_canon /usr/share/cups/data/
Old 10-20-2005, 12:58 PM   #3
Registered: Jul 2005
Posts: 139

Original Poster
Rep: Reputation: 15
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!
Old 10-20-2005, 01:55 PM   #4
Registered: Mar 2002
Location: Oklahoma
Posts: 981

Rep: Reputation: 36
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
DeviceURI: parallel:/dev/lp0

- - - - - - -

hope this helps


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
CUPS Command Line zaicheke Linux - Software 1 11-25-2004 03:26 PM
command line file management class_struggle Linux - Newbie 2 07-29-2004 02:50 PM
print from command line, normally use cups itsjustme Linux - General 2 06-14-2004 11:14 AM
CUPS + command line chrisk5527 Linux - Software 1 03-01-2004 12:05 AM
Where is Command line utility for Cups and command tutorial mossy Linux - Software 8 01-16-2004 12:24 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration