How do I install and config a printer from the CLI?
I'm using debian 3.0, I have an old HPLJ series II printer. I am connecting through a paralell port.
I don't even have a /etc/printcap file. I don't need the printer to be used, or configured, from the network. I tried using CUPS with MEPIS, which I had installed previously, it didn't work at all, the printer just kept feeding pages. I also have windows 2k installed on another partition, the printer works great from windows. Anyway, I would like to install the printer, at least once, just from the command line. I tried google, but didn't really find what I wanted, if anybody could point me to a web-site that give such straight forward instructions, that would also be helpful. |
I use CUPS for my HP LaserJet 5P printer and it works pretty well. To configure it from the command line you can install CUPS and any dependancies, then configure it through lpadmin. The command I use is something like:
/usr/sbin/lpadmin -p LaserJet -E -v parallel:/dev/lp0 -m laserjet.ppd <ENTER> and that's it. After it's set up and you type in "lpstat -t" you should see the printer in the listing. The administration guide can be had at: http://cups.org/sam.html and is pretty handy in setting up print spoolers with CUPS. |
How do I install and config a printer from the CLI?
usr/sbin/lpadmin -p LaserJet -E -v parallel:/dev/lp0 -m laserjet.ppd <ENTER>
and that's it. After it's set up and you type in "lpstat -t" you should see the printer in the listing. That almost worked. Here is my output: # lpstat -t scheduler is running system default destination: LaserJet device for LaserJet: parallel:/dev/lp0 LaserJet accepting requests since Jan 01 00:00 printer LaserJet is idle. enabled since Jan 01 00:00 That looks about right, but it doesn't work. Whenever I try to print something, I get a message that the job is going to the printer, but nothing happens - the printer doesn't even try. |
Allright. Next thing to check is if it's getting to the spooler okay. Try an "lp <filename>" with a text file then run "lpstat -t" and check if it gives you any errors. I believe it also dumps errors in the /var/log(/cups?) somewhere.
Another important thing to note is the permission of the /dev/lp port in question. For instance, on Mandrake 8.2 I need to reconfigure PAM so that the group my users are assigned to can access it. "chmod 0666 /dev/lp0" for testing, and list it after you've attempted printing to it to make sure it's still permissioned rw-rw-rw-. Outside permissioning it usually "just works" on Mandrake and Gentoo for me, but I don't have any experience with straight Debian installs. There might be something specific that Deb needs aside from what I'm used to. |
Perhaps Apsfilter would suit your needs better than CUPS. I've used Apsfilter myself before I discovered CUPS and it served me well at the time. Here's an article that introduces Apsfilter, in case you're interested:
http://www.onlamp.com/pub/a/bsd/2003...y_Daemons.html |
This is what I'm getting:
# lp deb_notes.txt lp: unable to print file: server-error-not-accepting-jobs # lpstat -t scheduler is running system default destination: LaserJet device for LaserJet: parallel:/dev/lp0 LaserJet not accepting requests since Jan 01 00:00 - Rejecting Jobs printer LaserJet is idle. enabled since Jan 01 00:00 Rejecting Jobs |
All times are GMT -5. The time now is 02:27 AM. |