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

Notices

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

Rep: Reputation: 15
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!
 
Old 10-20-2005, 12:12 PM   #2
gbonvehi
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:
Code:
/usr/bin/lpr -P my_canon /usr/share/cups/data/testprint.ps
 
Old 10-20-2005, 12:58 PM   #3
grautu
Member
 
Registered: Jul 2005
Posts: 139

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

Rep: Reputation: 34
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
 
  


Reply


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


All times are GMT -5. The time now is 08:57 AM.

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