/etc/printcap for samba-shared printer...

Stewart Morgan stewart at visint.co.uk
Thu Aug 27 10:06:48 GMT 1998

On Tue, 25 Aug 1998, The Hermit Hacker wrote:

> Morning...
> 	Just spent this evening getting printing setup off my FreeBSD
> machine (oh, how I love Solaris at these times *groan*)...got it now so
> that I can print directly from Netscape, color and graphics and all.
> 	The printer is an HP 560c.
> 	Now, I want to be able to print from my Windoze95 machine, and
> have samba setup for that, as well as file sharing.  If I setup my Windoze
> machine such that my printer is \\thelab\deskjet, which is the same
> printer (in /etc/printcap) that I use for Netscape under Unix, the test
> page gets sent across, but it isn't correct (graphic is all skewed).

	If it's any help this is the setup we've got -- basically, it'
all from the Samba documentation (docs/Printing.txt I think?). Woody's
printer is an HP LaserJet 4 non-ps printer.

woody|Woody's Printer:\

#!/bin/sh -x

# 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

# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
#       echo translate
        echo "print -"
) | /usr/local/bin/smbclient "\\\\woody\\HP\ LJ" "" -U woody -N -P

Simply change the relevent details (man smbclient(1) also helps).

Stewart Morgan
--------------                                                                 -
Systems Administrator

Vision Interactive Ltd
18 Whiteladies Road, Clifton, Bristol, BS8 2LG.

E-Mail	: stewart at visint.co.uk
Tel	: +44 (0)117 973 0597
Fax	: +44 (0)117 923 8522
WWW	: http://www.visint.co.uk/

More information about the samba mailing list