how to set up printer from command line
how to set up printer from command line
I'm from a Solaris (printer.conf) background and having trouble setting up a printer on the network.
My CentOS box does not have a GUI interface available.
I have been playing with lpadmin trying to add a printer - which it did, but everything is disabled, and the "enable"
command is not found on my machine.
How do I make a simple printer on my network talk to my centOS box??? Thanks for any help - I'm
definitely a newbie with this "cups" stuff!
Here's the printer.conf from a Solaris machine that works:
raphael:\
:bsdaddr=igppps1,raphael,Solaris:
And the printers.conf from the CentOS box:
lumina# more printers.conf
# Printer configuration file for CUPS v1.2.4
# Written by cupsd on 2009-02-23 16:35
Info raphael
DeviceURI igppps1
State Stopped
StateMessage
StateTime 1235435739
Accepting No
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
/var/log/cups/access_log
lumina# more access_log
localhost - - [24/Feb/2009:11:44:30 -0800] "POST / HTTP/1.1" 200 268 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:44:33 -0800] "POST / HTTP/1.1" 200 175 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:44:33 -0800] "POST / HTTP/1.1" 200 158 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:45:03 -0800] "POST / HTTP/1.1" 200 175 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:45:03 -0800] "POST / HTTP/1.1" 200 158 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:51:37 -0800] "POST / HTTP/1.1" 200 268 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:51:38 -0800] "POST / HTTP/1.1" 200 351 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:51:38 -0800] "POST / HTTP/1.1" 200 351 CUPS-Get-Classes successful-ok
localhost - - [24/Feb/2009:11:51:38 -0800] "POST / HTTP/1.1" 200 75 CUPS-Get-Default client-error-not-found
localhost - - [24/Feb/2009:11:51:38 -0800] "POST / HTTP/1.1" 200 182 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:52:21 -0800] "POST / HTTP/1.1" 200 351 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:52:21 -0800] "POST / HTTP/1.1" 200 351 CUPS-Get-Classes successful-ok
localhost - - [24/Feb/2009:11:52:21 -0800] "POST / HTTP/1.1" 200 75 CUPS-Get-Default client-error-not-found
localhost - - [24/Feb/2009:11:52:21 -0800] "POST / HTTP/1.1" 200 182 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:58:58 -0800] "POST / HTTP/1.1" 200 268 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:59:00 -0800] "POST / HTTP/1.1" 200 175 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:59:00 -0800] "POST / HTTP/1.1" 200 158 Get-Jobs successful-ok
localhost - - [24/Feb/2009:12:00:34 -0800] "POST / HTTP/1.1" 200 1756 CUPS-Get-Devices -
localhost - - [24/Feb/2009:12:00:49 -0800] "POST / HTTP/1.1" 200 923084 CUPS-Get-PPDs -
localhost - - [24/Feb/2009:12:05:37 -0800] "POST / HTTP/1.1" 200 268 Get-Jobs successful-ok
localhost - - [24/Feb/2009:12:05:40 -0800] "POST / HTTP/1.1" 200 175 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:12:05:40 -0800] "POST / HTTP/1.1" 200 158 Get-Jobs successful-ok
/var/log/cups/error_log
I [24/Feb/2009:11:58:43 -0800] Listening to 127.0.0.1:631 (IPv4)
I [24/Feb/2009:11:58:43 -0800] Listening to /var/run/cups/cups.sock (Domain)
I [24/Feb/2009:11:58:43 -0800] Loaded configuration file "/etc/cups/cupsd.conf"
I [24/Feb/2009:11:58:43 -0800] Using default TempDir of /var/spool/cups/tmp...
I [24/Feb/2009:11:58:43 -0800] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [24/Feb/2009:11:58:43 -0800] Configured for up to 100 clients.
I [24/Feb/2009:11:58:43 -0800] Allowing up to 100 client connections per host.
I [24/Feb/2009:11:58:43 -0800] Using policy "default" as the default!
I [24/Feb/2009:11:58:43 -0800] Full reload is required.
I [24/Feb/2009:11:58:43 -0800] Loaded MIME database from '/etc/cups': 34 types, 38 filters...
I [24/Feb/2009:11:58:43 -0800] Loading job cache file "/var/cache/cups/job.cache"...
I [24/Feb/2009:11:58:43 -0800] Full reload complete.
I [24/Feb/2009:11:58:43 -0800] Listening to 127.0.0.1:631 on fd 3...
I [24/Feb/2009:11:58:43 -0800] Listening to /var/run/cups/cups.sock on fd 4...
I [24/Feb/2009:12:00:34 -0800] Started "/usr/lib/cups/daemon/cups-deviced" (pid=29965)
I [24/Feb/2009:12:00:49 -0800] Started "/usr/lib/cups/daemon/cups-driverd" (pid=30022)
Here's some info from the CentOS box:
lumina# lpc status
raphael:
queuing is disabled
printing is disabled
no entries
daemon present
My CentOS box does not have a GUI interface available.
I have been playing with lpadmin trying to add a printer - which it did, but everything is disabled, and the "enable"
command is not found on my machine.
How do I make a simple printer on my network talk to my centOS box??? Thanks for any help - I'm
definitely a newbie with this "cups" stuff!
Here's the printer.conf from a Solaris machine that works:
raphael:\
:bsdaddr=igppps1,raphael,Solaris:
And the printers.conf from the CentOS box:
lumina# more printers.conf
# Printer configuration file for CUPS v1.2.4
# Written by cupsd on 2009-02-23 16:35
Info raphael
DeviceURI igppps1
State Stopped
StateMessage
StateTime 1235435739
Accepting No
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
/var/log/cups/access_log
lumina# more access_log
localhost - - [24/Feb/2009:11:44:30 -0800] "POST / HTTP/1.1" 200 268 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:44:33 -0800] "POST / HTTP/1.1" 200 175 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:44:33 -0800] "POST / HTTP/1.1" 200 158 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:45:03 -0800] "POST / HTTP/1.1" 200 175 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:45:03 -0800] "POST / HTTP/1.1" 200 158 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:51:37 -0800] "POST / HTTP/1.1" 200 268 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:51:38 -0800] "POST / HTTP/1.1" 200 351 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:51:38 -0800] "POST / HTTP/1.1" 200 351 CUPS-Get-Classes successful-ok
localhost - - [24/Feb/2009:11:51:38 -0800] "POST / HTTP/1.1" 200 75 CUPS-Get-Default client-error-not-found
localhost - - [24/Feb/2009:11:51:38 -0800] "POST / HTTP/1.1" 200 182 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:52:21 -0800] "POST / HTTP/1.1" 200 351 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:52:21 -0800] "POST / HTTP/1.1" 200 351 CUPS-Get-Classes successful-ok
localhost - - [24/Feb/2009:11:52:21 -0800] "POST / HTTP/1.1" 200 75 CUPS-Get-Default client-error-not-found
localhost - - [24/Feb/2009:11:52:21 -0800] "POST / HTTP/1.1" 200 182 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:58:58 -0800] "POST / HTTP/1.1" 200 268 Get-Jobs successful-ok
localhost - - [24/Feb/2009:11:59:00 -0800] "POST / HTTP/1.1" 200 175 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:11:59:00 -0800] "POST / HTTP/1.1" 200 158 Get-Jobs successful-ok
localhost - - [24/Feb/2009:12:00:34 -0800] "POST / HTTP/1.1" 200 1756 CUPS-Get-Devices -
localhost - - [24/Feb/2009:12:00:49 -0800] "POST / HTTP/1.1" 200 923084 CUPS-Get-PPDs -
localhost - - [24/Feb/2009:12:05:37 -0800] "POST / HTTP/1.1" 200 268 Get-Jobs successful-ok
localhost - - [24/Feb/2009:12:05:40 -0800] "POST / HTTP/1.1" 200 175 CUPS-Get-Printers successful-ok
localhost - - [24/Feb/2009:12:05:40 -0800] "POST / HTTP/1.1" 200 158 Get-Jobs successful-ok
/var/log/cups/error_log
I [24/Feb/2009:11:58:43 -0800] Listening to 127.0.0.1:631 (IPv4)
I [24/Feb/2009:11:58:43 -0800] Listening to /var/run/cups/cups.sock (Domain)
I [24/Feb/2009:11:58:43 -0800] Loaded configuration file "/etc/cups/cupsd.conf"
I [24/Feb/2009:11:58:43 -0800] Using default TempDir of /var/spool/cups/tmp...
I [24/Feb/2009:11:58:43 -0800] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [24/Feb/2009:11:58:43 -0800] Configured for up to 100 clients.
I [24/Feb/2009:11:58:43 -0800] Allowing up to 100 client connections per host.
I [24/Feb/2009:11:58:43 -0800] Using policy "default" as the default!
I [24/Feb/2009:11:58:43 -0800] Full reload is required.
I [24/Feb/2009:11:58:43 -0800] Loaded MIME database from '/etc/cups': 34 types, 38 filters...
I [24/Feb/2009:11:58:43 -0800] Loading job cache file "/var/cache/cups/job.cache"...
I [24/Feb/2009:11:58:43 -0800] Full reload complete.
I [24/Feb/2009:11:58:43 -0800] Listening to 127.0.0.1:631 on fd 3...
I [24/Feb/2009:11:58:43 -0800] Listening to /var/run/cups/cups.sock on fd 4...
I [24/Feb/2009:12:00:34 -0800] Started "/usr/lib/cups/daemon/cups-deviced" (pid=29965)
I [24/Feb/2009:12:00:49 -0800] Started "/usr/lib/cups/daemon/cups-driverd" (pid=30022)
Here's some info from the CentOS box:
lumina# lpc status
raphael:
queuing is disabled
printing is disabled
no entries
daemon present
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: how to set up printer from command line
man accept
man cupsenable
man lpstat
man cupsenable
man lpstat
Re: how to set up printer from command line
Is there some man page thing I need to install!?!?!
lumina# man accept
No manual entry for accept
lumina# man cupsenable
No manual entry for cupsenable
lumina# man lpstat
No manual entry for lpstat
lumina# man accept
No manual entry for accept
lumina# man cupsenable
No manual entry for cupsenable
lumina# man lpstat
No manual entry for lpstat
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: how to set up printer from command line
You don't have cups installed.
yum install cups
yum install cups
Re: how to set up printer from command line
Well - cups is in place. I'm getting closer. Raphael is the printer I'm trying to add.
I did a enable -h raphael
Followed by a cupsenable -h raphael
service cups restart
Then submitted a job... (ever the optimist!)...
lumina# lpc status
raphael:
queuing is enabled
printing is disabled
1 entries
daemon present
Just saw your message, decided to verify cups is there...
lumina# yum install cups
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: ftp-stud.fht-esslingen.de
* base: mirror.nic.uoregon.edu
* updates: centos.promopeddler.com
* addons: mirrors.versaweb.com
* extras: mirror.hmc.edu
Setting up Install Process
Parsing package install arguments
Package cups - 1:1.2.4-11.18.el5_2.3.x86_64 is already installed.
Nothing to do
So -- from here -- how do I enable printing???!!!
Thank you for your help!
I did a enable -h raphael
Followed by a cupsenable -h raphael
service cups restart
Then submitted a job... (ever the optimist!)...
lumina# lpc status
raphael:
queuing is enabled
printing is disabled
1 entries
daemon present
Just saw your message, decided to verify cups is there...
lumina# yum install cups
Loading "fastestmirror" plugin
Loading mirror speeds from cached hostfile
* rpmforge: ftp-stud.fht-esslingen.de
* base: mirror.nic.uoregon.edu
* updates: centos.promopeddler.com
* addons: mirrors.versaweb.com
* extras: mirror.hmc.edu
Setting up Install Process
Parsing package install arguments
Package cups - 1:1.2.4-11.18.el5_2.3.x86_64 is already installed.
Nothing to do
So -- from here -- how do I enable printing???!!!
Thank you for your help!
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: how to set up printer from command line
lumina# lpstat -t
scheduler is running
no system default destination
device for raphael: igppps1
raphael accepting requests since Mon 23 Feb 2009 04:35:39 PM PST
printer raphael disabled since Mon 23 Feb 2009 04:35:39 PM PST -
reason unknown
raphael-1 root 1024 Tue 24 Feb 2009 12:32:34 PM PST
lumina#
I am able to print to this printer from other machines, so I know it isn't the printer side with the problem......
How do I set up the default destination?
scheduler is running
no system default destination
device for raphael: igppps1
raphael accepting requests since Mon 23 Feb 2009 04:35:39 PM PST
printer raphael disabled since Mon 23 Feb 2009 04:35:39 PM PST -
reason unknown
raphael-1 root 1024 Tue 24 Feb 2009 12:32:34 PM PST
lumina#
I am able to print to this printer from other machines, so I know it isn't the printer side with the problem......
How do I set up the default destination?
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: how to set up printer from command line
man lpadmin
You must supply a valid uri for that printer.
Some examples with URIs from my system.
With a deskjet compatible socket interface:
lpadmin -prapheal -vsocket://192.168.107.210:9100
With an lpd server;
lpadmin -prapheal -vlpd://192.168.107.203/L1
For a Parallel Printer:
lpadmin -prapheal -vparallel:/dev/lp0
Then 'cupsenable raphael'
If you enable remote admin, you can connect to port 631 with your browser to configure CUPS.
You must supply a valid uri for that printer.
Some examples with URIs from my system.
With a deskjet compatible socket interface:
lpadmin -prapheal -vsocket://192.168.107.210:9100
With an lpd server;
lpadmin -prapheal -vlpd://192.168.107.203/L1
For a Parallel Printer:
lpadmin -prapheal -vparallel:/dev/lp0
Then 'cupsenable raphael'
If you enable remote admin, you can connect to port 631 with your browser to configure CUPS.
Re: how to set up printer from command line
THANK YOU!!!!!!!!!
:)
:)
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: how to set up printer from command line
Also don't forget to specify your driver (-i).
Browse /usr/share/cups/model to find a ppd for your printer.
EX:
lpadmin -prapheal -vlpd://192.168.107.203/L1 -i/usr/share/cups/model/deskjet2.ppd.gz
Browse /usr/share/cups/model to find a ppd for your printer.
EX:
lpadmin -prapheal -vlpd://192.168.107.203/L1 -i/usr/share/cups/model/deskjet2.ppd.gz