[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Print to HPLaserjet 5/L on a windows box



There was a thread long ago about how to do this. I don't remember when. I'm going to
assume you first searched the debian-user archives before posting to the list. (That
*would* be the good-netizen thing to do.) Ahem. Anyway. The first thing you'll want is
magicfilter. magicfilter will take the file you're trying to print and convert it to
HP printer language. Then you have to get it to the windoze machine. This is
accomplished use smbclient. smbclient is part of the samba package so you'll need to
install that too.

First, set up a printer with magicfilter (you'll do this during the package
configuration), pretending the printer is hooked to your linux box. It'll want a
device for the printer, just tell it /dev/lp0, or whatever (this doesn't matter as
we'll change it later). You'll end up with something like the following in your
/etc/printcap:

#
# Copyright (c) 1983 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of California at Berkeley. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# @(#)etc.printcap 5.2 (Berkeley) 5/5/88
#
# > This file was generated by /usr/sbin/magicfilterconfig. <
#
lp|lj|hplj5p|HP Laserjet 5P:\
 :lp=/dev/lp0:sd=/var/spool/lpd/hplj5p:\
 :sh:pw#80:pl#72:px#1440:mx#0:\
 :if=/usr/sbin/ljet4-filter:\
 :af=/var/log/lp-acct:lf=/var/log/lp-errs:

Now, without going into too many details of lpr, the 'if' (input filter) entry is a
script that runs with it's output directed to the device specified by 'lp' (in this
case, /dev/lp0). But we want the output to be printer on your unix box. So, we'll
change the lp=/dev/lp0 to lp=/dev/null and make a wrapper-script around
/usr/sbin/ljet4-filter which will send the output to the windows printer. Create the
following script (name it /usr/sbin/win95-print or whatever).

#!/bin/sh
exec /usr/sbin/ljet4-filter $* | /usr/bin/smbclient '\\win95box\printername' -P -N -c
'print -'

Just substitute your win95box and printername and then change printcap so that
'if=/usr/sbin/win95-print' and you should be golden.

... wrote:

>         Well, the subject pretty much says it all.  Is there an (semi)
> easy way for me to print to this box?  I've just spent the last 1/2 hour
> trying to coax windows to print a 10 page HTML doccument containing only
> text, and I've had no luck.  My workstation is (proudly :) 100% Microsoft
> free, but I network fine with everybody via Samba.  If I could print I
> would be a happy camper.  Any information, or links to HOWTO's etc etc
> would be greatly apreciated.
>
>                         mike...
>
> --
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null



--
Jens B. Jorgensen
jjorgens@bdsinc.com



--  
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: