Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
clueless on /dev/lp0 and printing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Thu Apr 28, 2005 9:30 am    Post subject: clueless on /dev/lp0 and printing Reply with quote

It seems to me that I have followed all the rules to get cups and my DeskJet 710C configured for printing. Yet there must be something wrong. I'll start with the kernel:
Code:

dmesg | grep parport
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,EPP,ECP,DMA]
parport0: faking semi-colon
parport0: Printer, HEWLETT-PACKARD DESKJET 710C
lp0: using parport0 (interrupt-driven).

One can't argue with this. The kernel is well equipped to be able to see the printer. (interrupt driven or polling doesn't affect my problem. I tried both)
An attempt to 'echo "test > /dev/lp0" produces no results, both as a user or root:

gentoo root # echo "test" > /dev/lp0
gentoo root #                     

Perhaps cupsd is taking control on print jobs. let's stop it and try again:
gentoo root # /etc/init.d/cupsd stop
 * Stopping cupsd...                                                                                                                   [ ok ]
gentoo root # echo "test" > /dev/lp0

Still no go.
How about a test page from a web interface of cupsd running? Here it is: client-error-not-possible. And /var/log/cups/error_log reveals:

print_job: request file type is application/postscript.
D [28/Apr/2005:10:48:39 +0200] check_quotas: requesting-user-name = 'agrypa1'
I [28/Apr/2005:10:48:39 +0200] Denying user "agrypa1" access to printer "DeskJet710C"...
D [28/Apr/2005:10:48:39 +0200] Sending error: client-error-not-possible

what do we have in the cupsd.conf file?
<Location />
Encryption IfRequested
Satisfy All
Order allow,deny
#Deny From All
Allow From localhost
Allow From 192.168.0.*
</Location>

<Location /admin>
AuthType Basic
AuthClass System
Encryption IfRequested
Satisfy All
Order allow,deny
#Deny From All
Allow From localhost
Allow From 192.168.0.*
</Location>

#<Location /printers>
#Order Deny,Allow
#Allow From 127.0.0.1
#</Location>

As you can see I even tried the commented lines (Location /printers) they didn't help so now they are commented.
The trouble is I have no clue how to deeper diagnose the issue.

I thought perhaps hpijs is not compiled with appropriate flags, so:
Code:

gentoo root # equery u hpijs
[ Searching for packages matching hpijs... ]
[ Colour Code : set unset ]
[ Legend    : Left column  (U) - USE flags from make.conf              ]
[           : Right column (I) - USE flags packages was installed with ]
[ Found these USE variables for net-print/hpijs-1.5 ]
 U I
 + + cups       : Add support for CUPS (Common Unix Printing System)
 + + foomaticdb : Adds support for the foomatic printing driver database
 + + ppds       : Adds support for automatically generated ppd (printing driver) files

they seem to be set all right...


thanks for any hints.
Agryppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
dirk_salewski
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 216
Location: Germany

PostPosted: Thu Apr 28, 2005 11:19 am    Post subject: Reply with quote

Hm, are You sure that Your devices really exist? That symlinks point to the right devices and things? And the permissions are properly set (You can see from the logs that Your access is denied as agrypa1)? Are the devices writable? If /dev/lp0 is read-only You probably could send the whole encyclopedia britannica into it - You wouldn't see any output (I wonder, though, why You don't get any error message as root when echoing).

Greetings,

Dirk
Back to top
View user's profile Send private message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Thu Apr 28, 2005 11:40 am    Post subject: Reply with quote

dirk_salewski wrote:
Hm, are You sure that Your devices really exist? That symlinks point to the right devices and things? And the permissions are properly set

Code:
gentoo root # ls -l /dev/lp0
crw-rw----  1 root lp 6, 0 kwi 25 16:02 /dev/lp0


Code:
gentoo dev # cat /proc/devices | grep lp
  6 lp


I do not have a symlink lp -> lp0. Could that affect printing? I added it and echoed into /dev/lp0. I didn't go.
Agryppa
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
ChipChopChippy
n00b
n00b


Joined: 21 Apr 2003
Posts: 46

PostPosted: Thu Apr 28, 2005 11:53 am    Post subject: Reply with quote

A couple of things:

Your printer (the HP710C) is a PPA-based printer - as such it doesn't accept ASCII-feed i.e. echo "test" > /dev/lp0 will not work (see the http://www.gentoo.org/doc/en/printing-howto.xml documentation e.g. low-level testing).

I'm assuming that you have emerged foomatic and hpijs (in addition to cups) - but have you tried downloading a PPD file from http://www.linuxprinting.org and skipping section 4. PPD File Configuration i.e. download the ppd file from http://www.linuxprinting.org/show_printer.cgi?recnum=HP-DeskJet_710C and placing it in (if my memory serves me correctly) /usr/share/foomatic/db/source/driver/........ (my memory fails me at this point :roll: )

yours cups config looks okay at first glance.
Back to top
View user's profile Send private message
agrypa1
Apprentice
Apprentice


Joined: 31 Mar 2005
Posts: 244

PostPosted: Thu Apr 28, 2005 2:24 pm    Post subject: Reply with quote

ChipChopChippy wrote:
[...] but have you tried downloading a PPD file from http://www.linuxprinting.org and skipping section 4. PPD File Configuration[...]


Hi,
I followed your adviced and the results are very good. Problem is the success is virtual :-)
Here is the output of the /var/log/messages after I tried a test page:
Code:
Apr 28 16:01:49 gentoo pnm2ppa[11640]: Starting print job
Apr 28 16:01:49 gentoo pnm2ppa[11640]: Printing  page  1 (PixMap)
Apr 28 16:01:51 gentoo pnm2ppa[11640]: Finished rendering page  1
Apr 28 16:01:51 gentoo pnm2ppa[11640]: Print job completed successfully

Funny thing is there's no printer activity. The printer itself works under the control of another OS on the same machine.

Code:
E [28/Apr/2005:16:23:21 +0200] PID 12153 stopped with status 1!
< - error_log
_________________
The first successor of Saint Peter was Linus (a.d. 68-79) - whose namesake became the creator of Linux in our time. Torvalds' middle name is Benedict - the name assumed by the previous Pope who resigned from office.
Back to top
View user's profile Send private message
dirk_salewski
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 216
Location: Germany

PostPosted: Thu Apr 28, 2005 2:34 pm    Post subject: Reply with quote

agrypa1 wrote:
The printer itself works under the control of another OS on the same machine

emacs, I suppose ;-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum