Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Printer from Linux Console -- lpadmin command -ubuntu 1104 2

Status
Not open for further replies.

Tranbo

IS-IT--Management
Apr 14, 2010
75
US
I have CUPS install and would like to add a Okidata 320 on lpt port to the printing queue in linux console -- no X server, no GUI. The CUPS web admin is not available for this installation.

lpinfo -m

show:

foomatic-db-compressed-ppds:0/Oki-ML_320-okiibm.ppd Oki ML 320 Foomatic/okiibm (recommended)

lpadmin -p oki -v parallel:/dev/lp0 -m Oki-ML_320-okiibm.ppd
lpadmin: Unable to copy PPD file!


How do I add this printer using lpadmin command?









 
Try with .gz on the end of the .ppd filename?

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
Not Working Yet


user@user:~$ lpadmin -p oki -v parallel:/dev/lp0 -m Oki-ML_320-okiibm.ppd.gz
lpadmin: Unable to copy PPD file!
 
Oh, you aren't logged in as root...?

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
here is the cups error log;

[24/Jan/2012:11:00:16 -0800] [cups-driverd] Unable to open "/usr/share/cups/model/Oki-ML_320-okiibm.ppd" - No such file or directory
E [24/Jan/2012:11:00:16 -0800] copy_model: empty PPD file!
E [24/Jan/2012:11:00:16 -0800] Returning IPP server-error-internal-error for CUPS-Add-Modify-Printer (ipp://localhost/printers/oki) from localhost
E [24/Jan/2012:16:20:20 -0800] [cups-driverd] Unable to open "/usr/share/cups/model/Oki-ML_320-okiibm.ppd.gz" - No such file or directory
E [24/Jan/2012:16:20:20 -0800] copy_model: empty PPD file!
E [24/Jan/2012:16:20:20 -0800] Returning IPP server-error-internal-error for CUPS-Add-Modify-Printer (ipp://localhost/printers/oki) from localhost
~
 
Dan it! always forgot that sudo thingy :)

user@user:/var/log/cups$ sudo lpadmin -p oki -v parallel:/dev/lp0 -m Oki-ML_320-okiibm.ppd.gz
[sudo] password for user:
lpadmin: Unable to copy PPD file!
user@user:/var/log/cups$


Still not work :-(
 
Is the PPD present in /usr/share/cups/model?

Perhaps the one you identified earlier requires you to use foomatic-ppd (see the man page) to generate a PPD file first. I haven't used foomatic so can't advise you much on that.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
I got it working now. The model need to point to the foomatic-db-compressed-ppds:0/Oki-ML_320-okiibm.ppd


Here is how I did it.

*Configured Printer in Linux Console How-To*

Example: add OKidata ML-320 on lpt1 to the queue name Oki using ubuntu 1104

-Get info on the device

user@user:~$ lpinfo -v
network lpd
network socket
direct scsi
network http
network ipp
direct parallel:/dev/lp0


-Get info on the Driver available

user@user:~$ lpinfo -m |grep oki

foomatic-db-compressed-ppds:0/Oki-Microline_IBM_compatible_9_pin-okiibm.ppd Oki Microline

IBM compatible 9 pin Foomatic/okiibm (recommended)
foomatic-db-compressed-ppds:1/Oki-Microline_IBM_compatible_9_pin-okiibm.ppd Oki Microline

IBM compatible 9 pin Foomatic/okiibm (recommended)
foomatic-db-compressed-ppds:0/Oki-ML_320-okiibm.ppd Oki ML 320 Foomatic/okiibm

(recommended)
foomatic-db-compressed-ppds:0/Oki-ML_321-okiibm.ppd Oki ML 321 Foomatic/okiibm

(recommended)


-Add printer Using lpadmin -- need to be root

user@user:~$ sudo lpadmin -p oki -v parallel:/dev/lp0 -m

foomatic-db-compressed-ppds:0/Oki-ML_320-okiibm.ppd


-Get Printer Status

user@user:~$ lpstat -t
scheduler is running
device for oki: parallel:/dev/lp0
oki not accepting requests since Wed 25 Jan 2012 10:01:10 AM PST -
reason unknown

-Enable Printer to accept jobs

user@user:~$ sudo cupsaccept oki

-Get Printer Status again

user@user:~$ lpstat -t
scheduler is running
device for oki: parallel:/dev/lp0
printer oki is idle. enabled since Wed 25 Jan 2012 10:01:10 AM PST

-Print a test page

user@user:~$ lp -d oki /var/log/cups/error_log
request id is oki-89 (1 file(s))


The-End

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top