[plug] Printing problem (lprng/lpd config?)

Peter Wright pete at cygnus.uwa.edu.au
Mon Apr 23 13:08:10 WST 2001


Hi all,

I've recently managed to acquire a second-hand HP Laserjet 4L (in very good
condition too, woohoo) printer and last night I finally got around to
trying to set the damn thing up.

Let me preface by saying that I've always had problems using printers with
Linux - in the past I've had various printers working reasonably well (after
the computer finally decides I've suffered enough configuration pain).
However, I haven't actually had much cause to use printers at home for a
couple of years now, so this is my first serious attempt in some time.

Let me further clarify that I hope the problems I have with printing are
pretty much confined to me - otherwise I think my Linux advocacy in future
is going to have to include qualifiers like "as long as you don't care
about using printers in any way, shape or form." :-/


Okay. We have stan, a Debian (mostly sid) machine (486-100, 24M RAM). I
have the following packages installed on it: lprng, apsfilter, gs-aladdin.
Having read in the Printing-HOWTO that apsfilterconfig is good for setting up an
/etc/printcap, I ran apsfilterconfig. It's very nice, I liked it. It
happily stuck a configuration block in /etc/printcap for the printer (which
I labelled "funky") and SUCCESSFULLY printed a test page (NB. it didn't do
this via lpd - it used gs and dumped output directly to /dev/lp0).

Now the problem emerged. I thought "Cool, I appear to have a working
printer! Damn, that was easy! Maybe the curse has been lifted!" Of course,
no such luck.

# lpr -Pfunky <sometextfile>

Nothing. Absolute zilch. The command didn't return, just hung there until I
interrupted (ctrl-C) it. After playing around with this for a bit, I tried
using

# lpq -Pfunky

to see if I could get any info from the printer queue. Nothing again, had
to interrupt again.

It didn't matter if it was a text or postscript file, neither worked.

Eventually I thought "hmm, perhaps there's something askew with the
lprng/lpd config file (located in /etc/lprng/lpd.conf for Debian). I opened
this file and looked through it... stopping when I realised that _every_
line (of which there were a lot (403)) was commented out. The man page gave
me no clue as to whether there's anything vital that needs to be given in
the config file, so I presumed that as Debian doesn't usually provide
completely dysfunctional default config files, it should be fine.

/etc/lprng/lpd.perms at least had a few lines not commented out, but
nothing looked like it was designed to stop me (as root) printing on the
local machine.

(NB. Sometime around this point, I changed /etc/printcap so that the first
printer entry (a default dot-matrix config) was commented out, and "funky"
was the first entry in /etc/printcap. This meant that I didn't have to use
-Pfunky in lpr/lpq/etc.)


Finally I tried using lpr in "debug" mode - eg.

# lpr -D1 example.ps

This spewed out a lot of interesting information (as you can see in the
attached file printer-errors.txt). However, the most interesting were the
last few lines, everything up to that point appeared okay:

2001-04-23-12:35:20.019 stan [2679] lpr  funky: setstatus: msg 'sending job 'root at stan+679' to funky at localhost'             
2001-04-23-12:35:20.026 stan [2679] lpr  funky: setstatus: msg 'connecting to 'localhost', attempt 1'                       
2001-04-23-12:35:20.057 stan [2679] lpr  funky: setstatus: msg 'connected to 'localhost''                                   
2001-04-23-12:35:20.060 stan [2679] lpr  funky: setstatus: msg 'requesting printer funky at localhost'                         

[ this is where it hangs - I hit ctrl-C after waiting about 13 seconds ]

2001-04-23-12:35:33.550 stan [2679] lpr  funky: cleanup_INT: signal Interrupt, Errorcode 0                                  
2001-04-23-12:35:33.554 stan [2679] lpr  funky: cleanup: done, exit(0)                                                      

So it appears to hang as it's "requesting printer funky at localhost".

Argh. Grrr.

If anyone can offer any suggestions as to what I might be doing wrong,
please do.

Thanks,

Pete.
-- 
http://cygnus.uwa.edu.au/~pete/

--
hundred-and-one symptoms of being an internet addict:
123. You ask the car dealer to install an extra cigarette lighter
     on your new car to power your notebook.
-------------- next part --------------
Script started on Mon Apr 23 12:34:56 2001

root at stan 12:34 ttypts/0 ~ !1 # lpr -D1 standchen-p1.ps
2001-04-23-12:35:19 [2679]  Initialize: /dev/null fd 3
2001-04-23-12:35:19 [2679]  initsetproctitle: doing setup
2001-04-23-12:35:19 [2679]  initsetproctitle: Argv 0xbffffd24, LastArgv 0xbfffffee
2001-04-23-12:35:19 [2679] lpr  setup_info: OriginalEUD 0, OriginalRUID 0
2001-04-23-12:35:19.597 [2679] lpr  Setup_configuration: starting, Allow_getenv 0
2001-04-23-12:35:19.600 [2679] lpr  Setup_configuration: Configuration file '/etc/lprng/lpd.conf'
2001-04-23-12:35:19.606 [2679] lpr  Setup_configuration: Require_configfiles_DYN '1'
2001-04-23-12:35:19.609 [2679] lpr  Get_config: required '1', '/etc/lprng/lpd.conf'
2001-04-23-12:35:19.632 stan [2679] lpr  Get_local_host: ShortHost_FQDN=stan, FQDNHost_FQDN=stan.flooble.net.au
2001-04-23-12:35:19.642 stan [2679] lpr  Setup_configuration: Host 'stan.flooble.net.au', ShortHost 'stan', user 'root'
2001-04-23-12:35:19.649 stan [2679] lpr  Build_printcap_info: list->count 0, raw->count 17
2001-04-23-12:35:19.658 stan [2679] lpr  Build_printcap_info: list->count 0, raw->count 0
2001-04-23-12:35:19.662 stan [2679] lpr  Get_parms: LP_mode 0
2001-04-23-12:35:19.667 stan [2679] lpr  Get_parms: option D
2001-04-23-12:35:19.670 stan [2679] lpr  Get_printer: original printer '<NULL>'
2001-04-23-12:35:19.673 stan [2679] lpr  Get_all_printcap_entries: starting
2001-04-23-12:35:19.679 stan [2679] lpr  Select_pc_info: looking for 'all', depth 0
2001-04-23-12:35:19.682 stan [2679] lpr  Select_pc_info: names[0] 'funky=funky'
2001-04-23-12:35:19.687 stan [2679] lpr  Select_pc_info: trying 'funky'
2001-04-23-12:35:19.690 stan [2679] lpr  Select_pc_info: names[1] 'raw1=raw1'
2001-04-23-12:35:19.693 stan [2679] lpr  Select_pc_info: trying 'raw1'
2001-04-23-12:35:19.699 stan [2679] lpr  Select_pc_info: returning '<NULL>'
2001-04-23-12:35:19.702 stan [2679] lpr  Select_pc_info: looking for '*', depth 0
2001-04-23-12:35:19.707 stan [2679] lpr  Select_pc_info: names[0] 'funky=funky'
2001-04-23-12:35:19.710 stan [2679] lpr  Select_pc_info: trying 'funky'
2001-04-23-12:35:19.716 stan [2679] lpr  Select_pc_info: names[1] 'raw1=raw1'
2001-04-23-12:35:19.718 stan [2679] lpr  Select_pc_info: trying 'raw1'
2001-04-23-12:35:19.721 stan [2679] lpr  Select_pc_info: returning '<NULL>'
2001-04-23-12:35:19.728 stan [2679] lpr  Get_all_printcap_entries: User_PC starting
2001-04-23-12:35:19.731 stan [2679] lpr  Select_pc_info: looking for 'all', depth 0
2001-04-23-12:35:19.736 stan [2679] lpr  Select_pc_info: names[0] 'funky=funky'
2001-04-23-12:35:19.739 stan [2679] lpr  Select_pc_info: trying 'funky'
2001-04-23-12:35:19.742 stan [2679] lpr  Select_pc_info: names[1] 'raw1=raw1'
2001-04-23-12:35:19.749 stan [2679] lpr  Select_pc_info: trying 'raw1'
2001-04-23-12:35:19.751 stan [2679] lpr  Select_pc_info: returning '<NULL>'
2001-04-23-12:35:19.757 stan [2679] lpr  Select_pc_info: looking for '*', depth 0
2001-04-23-12:35:19.760 stan [2679] lpr  Select_pc_info: names[0] 'funky=funky'
2001-04-23-12:35:19.763 stan [2679] lpr  Select_pc_info: trying 'funky'
2001-04-23-12:35:19.769 stan [2679] lpr  Select_pc_info: names[1] 'raw1=raw1'
2001-04-23-12:35:19.774 stan [2679] lpr  Select_pc_info: trying 'raw1'
2001-04-23-12:35:19.777 stan [2679] lpr  Select_pc_info: returning '<NULL>'
2001-04-23-12:35:19.780 stan [2679] lpr  Dump_line_list: Get_all_printcap_entries- after User - 0x80a4b58, count 0, max 0, list 0x0
2001-04-23-12:35:19.786 stan [2679] lpr  Get_all_printcap_entries: prefixing user
2001-04-23-12:35:19.790 stan [2679] lpr  Dump_line_list: Get_all_printcap_entries- All_line_list - 0x80a4c34, count 2, max 102, list 0x80a8230
2001-04-23-12:35:19.797 stan [2679] lpr    [ 0] 0x80a7ef0 ='funky'
2001-04-23-12:35:19.800 stan [2679] lpr    [ 1] 0x80a79d0 ='raw1'
2001-04-23-12:35:19.806 stan [2679] lpr  funky: Get_printer: final printer 'funky'
2001-04-23-12:35:19.809 stan [2679] lpr  funky: Fix_Rm_Rp_info: printer name 'funky'
2001-04-23-12:35:19.812 stan [2679] lpr  Reset_config: starting
2001-04-23-12:35:19.821 stan [2679] lpr  funky: Select_pc_info: looking for 'funky', depth 0
2001-04-23-12:35:19.827 stan [2679] lpr  funky: Find_pc_info: found name 'funky'
2001-04-23-12:35:19.830 stan [2679] lpr  funky: Select_pc_info: returning 'funky'
2001-04-23-12:35:19.836 stan [2679] lpr  funky: Select_pc_info: looking for 'funky', depth 0
2001-04-23-12:35:19.839 stan [2679] lpr  funky: Find_pc_info: found name 'funky'
2001-04-23-12:35:19.847 stan [2679] lpr  funky: Select_pc_info: returning 'funky'
2001-04-23-12:35:19.859 stan [2679] lpr  funky: Fix_Rm_Rp_info: Printer 'funky', Queue 'funky', Lp '<NULL>', Rp 'funky', Rh 'localhost'
2001-04-23-12:35:19.865 stan [2679] lpr  funky: lpr: Lpr_opts_DYN '<NULL>', argc 3
2001-04-23-12:35:19.868 stan [2679] lpr  funky: Make_job: before checking format ''
2001-04-23-12:35:19.871 stan [2679] lpr  funky: Make_job: after checking format 'f'
2001-04-23-12:35:19.877 stan [2679] lpr  funky: Make_job: 'qq' flag 0, queue 'funky', force_queuename '<NULL>'
2001-04-23-12:35:19.890 stan [2679] lpr  funky: *** Job Send_job- starting *** - 0xbffffa98
2001-04-23-12:35:19.894 stan [2679] lpr  funky:  info - 0xbffffa98, count 14, max 102, list 0x80a8788
2001-04-23-12:35:19.897 stan [2679] lpr  funky:   [ 0] 0x80a8a38 ='A=root at stan+679'
2001-04-23-12:35:19.903 stan [2679] lpr  funky:   [ 1] 0x80a89e0 ='C=A'
2001-04-23-12:35:19.906 stan [2679] lpr  funky:   [ 2] 0x80a9598 ='cf_out_image=Hstan.flooble.net.au
Proot
Jstandchen-p1.ps
CA
Aroot at stan+679
D2001-04-23-12:35:19.888
Qfunky
Nstandchen-p1.ps
fdfA679stan.flooble.net.au
UdfA679stan.flooble.net.au
'
2001-04-23-12:35:19.919 stan [2679] lpr  funky:   [ 3] 0x80a8948 ='copies=0x1'
2001-04-23-12:35:19.924 stan [2679] lpr  funky:   [ 4] 0x80a8a50 ='datafile_count=1'
2001-04-23-12:35:19.927 stan [2679] lpr  funky:   [ 5] 0x80a9388 ='datafiles=Nstandchen-p1.ps^AfdfA679stan.flooble.net.au^AUdfA679stan.flooble.net.au^A'
2001-04-23-12:35:19.931 stan [2679] lpr  funky:   [ 6] 0x80a89b8 ='file_hostname=stan.flooble.net.au'
2001-04-23-12:35:19.938 stan [2679] lpr  funky:   [ 7] 0x80a8598 ='format=f'
2001-04-23-12:35:19.941 stan [2679] lpr  funky:   [ 8] 0x80a89f0 ='H=stan.flooble.net.au'
2001-04-23-12:35:19.946 stan [2679] lpr  funky:   [ 9] 0x80a8a10 ='J=standchen-p1.ps'
2001-04-23-12:35:19.949 stan [2679] lpr  funky:   [10] 0x80a7bc8 ='number=679'
2001-04-23-12:35:19.956 stan [2679] lpr  funky:   [11] 0x80a8a28 ='P=root'
2001-04-23-12:35:19.959 stan [2679] lpr  funky:   [12] 0x80a8928 ='priority=A'
2001-04-23-12:35:19.962 stan [2679] lpr  funky:   [13] 0x80a8a68 ='transfername=cfA679stan.flooble.net.au'
2001-04-23-12:35:19.967 stan [2679] lpr  funky:   datafiles - count 1
2001-04-23-12:35:19.970 stan [2679] lpr  funky:    datafile[0] - 0x80a8938, count 6, max 102, list 0x80a8fa0
2001-04-23-12:35:19.977 stan [2679] lpr  funky:   [ 0] 0x80a6230 ='copies=0x1'
2001-04-23-12:35:19.980 stan [2679] lpr  funky:   [ 1] 0x80a8998 ='format=f'
2001-04-23-12:35:19.986 stan [2679] lpr  funky:   [ 2] 0x80a6218 ='N=standchen-p1.ps'
2001-04-23-12:35:19.989 stan [2679] lpr  funky:   [ 3] 0x80a61b8 ='openname=standchen-p1.ps'
2001-04-23-12:35:19.992 stan [2679] lpr  funky:   [ 4] 0x80a6240 ='size=81352'
2001-04-23-12:35:19.998 stan [2679] lpr  funky:   [ 5] 0x80a94b0 ='transfername=dfA679stan.flooble.net.au'
2001-04-23-12:35:20.001 stan [2679] lpr  funky:  destination - 0xbffffab0, count 0, max 0, list 0x0
2001-04-23-12:35:20.007 stan [2679] lpr  funky: *** end ***
2001-04-23-12:35:20.010 stan [2679] lpr  funky: Fix_send_auth: name '<NULL>'
2001-04-23-12:35:20.016 stan [2679] lpr  funky: Fix_send_auth: no security
2001-04-23-12:35:20.019 stan [2679] lpr  funky: setstatus: msg 'sending job 'root at stan+679' to funky at localhost'
2001-04-23-12:35:20.026 stan [2679] lpr  funky: setstatus: msg 'connecting to 'localhost', attempt 1'
2001-04-23-12:35:20.057 stan [2679] lpr  funky: setstatus: msg 'connected to 'localhost''
2001-04-23-12:35:20.060 stan [2679] lpr  funky: setstatus: msg 'requesting printer funky at localhost'
2001-04-23-12:35:33.550 stan [2679] lpr  funky: cleanup_INT: signal Interrupt, Errorcode 0
2001-04-23-12:35:33.554 stan [2679] lpr  funky: cleanup: done, exit(0)
root at stan 12:35 ttypts/0 ~ !2 # exit

Script done on Mon Apr 23 12:35:35 2001


More information about the plug mailing list