Re: Printing : Kernel 2.2.17 problems ?
I have a very strange problem with woody lprng and not with potato
lprng
With potato lprng this was working
lp|hplj1100|HP LaserJet 1100:\ :sd=/var/spool/lpd/hplj1100:\ :af=/var/spool/lpd/hplj1100/lp-acct:\
:bkf:\
:lp=|/usr/local/sbin/smbprint /var/spool/lpd/hplj1100/lp-acct:\
:if=/etc/magicfilter/ljet4-filter:
Now I *HAVE* to use
lp|hplj1100|HP LaserJet 1100:\
:sd=/var/spool/lpd/hplj1100:\
:af=/var/spool/lpd/hplj1100/lp-acct:\
:bkf:\
:lp=/dev/null:\
:if=( /etc/magicfilter/ljet4-filter |/usr/local/sbin/smbprint /var/spool/lpd/hplj1100/lp-acct ):
The piping to lp does not work at all. I tested hundreds of
possibilities and the only working for woody is the one I show above.
--JS
PS. Here is my /usr/local/sbin/smbprint
#!/bin/sh
# This script is an input filter for printcap printing on a unix machine. It
# uses the smbclient program to print the file to the specified smb-based
# server and service.
# For example you could have a printcap entry like this
#
# smb:lp=/dev/null:sd=/usr/spool/smb:sh:if=/usr/local/samba/smbprint
#
# which would create a unix printer called "smb" that will print via this
# script. You will need to create the spool directory /usr/spool/smb with
# appropriate permissions and ownerships for your system.
# Set these to the server and service you wish to print to
# In this example I have a WfWg PC called "lapland" that has a printer
# exported called "printer" with no password.
#
# Script further altered by hamiltom@ecnz.co.nz (Michael Hamilton)
# so that the server, service, and password can be read from
# a /usr/var/spool/lpd/PRINTNAME/.config file.
#
# Script further modified by Richard Sharpe to fix some things.
# Get rid of the -x on the first line, and add parameters
#
# -t now causes translate to be used when sending files
#
# In order for this to work the /etc/printcap entry must include an
# accounting file (af=...):
#
# cdcolour:\
# :cm=CD IBM Colorjet on 6th:\
# :sd=/var/spool/lpd/cdcolour:\
# :af=/var/spool/lpd/cdcolour/acct:\
# :if=/usr/local/etc/smbprint:\
# :mx=0:\
# :lp=/dev/null:
#
# The /usr/var/spool/lpd/PRINTNAME/.config file should contain:
# server=PC_SERVER
# service=PR_SHARENAME
# password="password"
#
# E.g.
# server=PAULS_PC
# service=CJET_371
# password=""
#
# Debugging log file, change to /dev/null if you like.
#
logfile=/tmp/smb-print.log
# logfile=/dev/null
#
# The last parameter to the filter is the accounting file name.
# Extract the directory name from the file name.
# Concat this with /.config to get the config file.
#
TRANS=0
eval acct_file=\${$#}
spool_dir=`dirname $acct_file`
config_file=$spool_dir/.config
# Should read the following variables set in the config file:
# server
# service
# password
eval `/bin/cat $config_file`
while getopts t c; do
case $c in
t)
TRANS=1
;;
'?') # Bad parameters, ignore it ...
;;
esac
done
#
# Some debugging help, change the >> to > if you want to same space.
#
echo "server $server, service $service" >> $logfile
(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
if [ $TRANS -eq 1 ]; then
echo translate
fi
echo "print -"
/bin/cat
) | /usr/bin/smbclient "\\\\$server\\$service" $password -U $server -N -P >> $logfile
On Sat, Sep 23, 2000 at 11:45:04AM +0518, USM Bish wrote:
|There seems to ba a major problem with lpr output for
|those who have recently upgraded to Kernel 2.2.17 and
|using lprng 3.6.12-6. I am still on "Slink" and with-
|holding upgrade till these issues are resolved.
|
|Ever since the release of Debian-2.2 as stable last
|month, there have been numerous postings on this list
|on this issue. Most of the people have been able to
|obtain raw output to /dev/lpN but the lpd daemon for
|some reason failed to deliver the desired output. One
|posting about 10 days ago also stated stoppage of lpr
|services on a running system ! There were no takers
|for that specific post.
|
|I have had problems with lpr on various distros over
|the last 4+ years, and have evolved a checklist to
|get this job going. The checklist has never failed so
|far on any distro. I was in personal correspondence
|with few of the people who posted such queries to our
|list, with the idea of helping fellow debianians out,
|based on my experience. But this one has really got
|me bowled!
|
|An exerpt of correspondence wit Stephan Kulka
|<e9626471@student.tuwien.ac.at>
|
|>> It appears that there is one BIG problem with
|>> "lprng". It is impossible for "checkpc" to give
|>> you .."cannot open /dev/lp1", when your device
|>> is polled to /dev/lp0 UNLESS there is some con-
|>> flict within "lprng" itself. As you know, lprng
|>> uses tcp/ip!
|>>
|>> Please re-confirm :
|>>
|>> a) checkpc reports /dev/lp1 while you are being
|>> polled to /dev/lp0 by tunelp.
|>
|> I can reconfirm all of that, even dmesg shows me
|> that lp0 is polled.
|>
|>> b) the version of "lprng" you are using.
|>
|> dselect tells me that it is the version 3.6.12-6.
|
|>From above it is evident, that there is some major
|problem between the polled device and the device
|the lpd daemon is addressing.
|
|I would have definitely mailed the maintainer of
|"lprng" by now, if it was not for the subsequent
|bit Stephan added:
|
|> Perhaps an interesting point:I did not know that
|> there is another printing tool except lpr. So, I
|> installed lpr first, and I had the problem with
|> the daemon (you remember), but after you explain-
|> ed to me to use checkpc I installed lprng and
|> deinstalled lpr.
|
|So obviously, the problem remains same whether lpr
|or lprng is used. The problem therefore appears to
|be kernel related (i.e. specific for 2.2.17).
|
|Before I knock the doors of our kernel maintainers
|and/or kernel.org, I just need a confirmation from
|people on this list using kernel 2.2.17 and lprng
|or lpr if they have faced similar problems. Please
|confirm version of lpr/ lprng as well .. (Personal
|mails welcome).
|
|Are there chances of tcp/ip conflicts or conflicts
|with other software (excluding plip) ?
|
|USM Bish
|
|
|--
|Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
|
--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GE d- s:+ a C++ UL++ P L+++ E---- W++ N++ o-- K- w---
O- M- V-- PS+ PE Y+ PGP t-- 5+ X- R* tv++ b+ DI- D+
G-- e+++ h* r++ y++
------END GEEK CODE BLOCK------
"Software is like sex- the best is for free"
-Linus Torvalds
Reply to: