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

Notices


Reply
  Search this Thread
Old 05-05-2004, 09:30 AM   #1
walterbyrd
Member
 
Registered: Apr 2004
Posts: 671

Rep: Reputation: 45
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.
 
Old 05-05-2004, 11:46 AM   #2
Inhibit
Member
 
Registered: Apr 2004
Distribution: Mandrake, Gentoo, SuSe, JDS
Posts: 53

Rep: Reputation: 15
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.
 
Old 05-07-2004, 04:34 PM   #3
walterbyrd
Member
 
Registered: Apr 2004
Posts: 671

Original Poster
Rep: Reputation: 45
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.
 
Old 05-07-2004, 05:19 PM   #4
Inhibit
Member
 
Registered: Apr 2004
Distribution: Mandrake, Gentoo, SuSe, JDS
Posts: 53

Rep: Reputation: 15
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.
 
Old 05-07-2004, 05:41 PM   #5
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
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
 
Old 05-07-2004, 06:26 PM   #6
walterbyrd
Member
 
Registered: Apr 2004
Posts: 671

Original Poster
Rep: Reputation: 45
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
 
  


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
Suse and CLI software install ghight SUSE / openSUSE 3 02-04-2005 08:32 AM
Pure CLI Install ORiGiNAl-SiN Slackware - Installation 2 11-19-2004 08:20 AM
Stuck with CLI on post install Kyl3 Fedora - Installation 4 07-26-2004 01:20 PM
printer config ivansv Linux - Hardware 1 05-15-2004 11:53 AM
how can i add a printer that is not listed in the "Red Hat Printer Config?" kublador Linux - Newbie 2 03-05-2003 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:12 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration