-   Linux - General (
-   -   Echo /devPrinting doesn't work, echo /usb/lp0 works, Testpage works, Printing doesn't (

Hegemon 07-31-2002 07:40 AM

Printing doesn't work but echo > /usb/lp0 works & Testpage works
I have used apsfilter to setup my printer and the testpage it prints comes out fine. I can also '''echo "test" > /dev/usb/lp0''' and that works. I cannot print in any programs though. Im guessing that their just not configured propperly or some global printer config file they access isn't setup but i don't know what. I have a HP Deskjet 930c via USB. :confused:

codejockey 08-01-2002 01:51 AM

A couple of thoughts:

(1) is lpd running? (ps -ef | egrep lpd should show lpd running in addition to your egrep process)
(2) try lpc status to see the status of each printer
(3) review /var/log/lpr (or similar) to check for errors
(4) review /etc/printcap entry for your printer to make sure all directories/files exist

Hope this helps.

Hegemon 08-10-2002 03:55 AM

The lpc shows the following
Printer Printing Spooling Jobs Server Subserver Redirect Status/(Debug)
lp@ender enabled enabled 0 none none

The jobs do increase when i try to print somthing.

I dont have a /var/log/lpr
I do have a /var/log/spool but its empty (there are several spool.1 etc all the same)

I have no idear how to read the /etc/printcap file

codejockey 08-15-2002 02:13 PM

The man page for printcap will tell you more than you want to know about the /etc/printcap file. The main thing to check is that any pathnames given in the entry for your printer are correct. For example, the following entry is for a laserjet 4L printer on /dev/lp0:

#HP LaserJet 4L entry (local, 300 dpi, B&W)
#laser|hplj4|HP laserjet 4L:\
# :lp=/dev/lp0:\
# :sd=/var/spool/lpd/lp0-laser:sh:\
# :lf=/var/spool/lpd/lp0-laser/lp-err:\
# :if=/usr/local/filter/ljet4l-filter:\
# :mx#0

So, to check this entry, I'd make sure that all of the paths referenced did in fact exist (/dev/lp0, /var/spool/lpd/lp0-laser, /usr/local/filter/ljet4l-filter, etc.). Without going into the details of each field, you can still make sure that any path specified is valid. If you find a missing directory/file/device, either create it or change the printcap entry to match reality.

If you are using a filter (the if= field in my example), verify that the filter is executable. Also, if your filter is a script, check the first line of the filter in case it uses a construct such as #! /usr/bin/perl or similar -- and make sure that any path is also correct (e.g., /usr/bin/perl really exists). You can also use set -x in the filter (again, if it's a script) to trap any errors that may not be visible to you now.

Hope this helps.

All times are GMT -5. The time now is 03:27 AM.