From owner-freebsd-questions Sat Jan 10 23:21:50 1998 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA27775 for questions-outgoing; Sat, 10 Jan 1998 23:21:50 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from mail.xmission.com (mail.xmission.com [198.60.22.22]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id XAA27770 for ; Sat, 10 Jan 1998 23:21:46 -0800 (PST) (envelope-from softweyr@xmission.com) Received: from xmission.com [166.70.2.43] by mail.xmission.com with esmtp (Exim 1.73 #4) id 0xrHiK-0006sh-00; Sun, 11 Jan 1998 00:21:45 -0700 Message-ID: <34B87604.2E665BAD@xmission.com> Date: Sun, 11 Jan 1998 00:34:29 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.04 [en] (X11; I; FreeBSD 2.2.5-RELEASE i386) MIME-Version: 1.0 To: questions@freebsd.org Subject: Printing to Windows machine via Samba smbclient Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk We got a new PostScript laser printer for Christmas. It actually belongs to my wife, for FrameMaker on her Win95/NT machine. I, of course, want to use it from FreeBSD also. I searched the archives and couldn't find any simple solutions to this, so I plunged in and got it working myself. It only took me 10 minutes, but I thought I should share it with anyone else, just in case. First, the printcap entry: ps|lp4|PostScript printer via network:\ :lp=/dev/null:\ :sd=/var/spool/ps:\ :lf=/var/spool/ps/log:\ :af=/var/spool/ps/acct:\ :if=/usr/local/bin/psprint:\ :mx#0:\ :sf:\ :sh: All pretty straightforward. The input filter, /usr/local/bin/psprint, is a simple shell script: #! /bin/sh # # Print files to the PostScript laser print on our Win95 machine. # Prints our standard input to the shared printer via SMB. smbclient \\\\anchor\\okidata "" -P -U wes -c 'print -' where \\anchor\okidata is the SMB server name and share name for the print service, and wes is a user on anchor that doesn't require a password (otherwise put the password where the null string "" is). Make the /var/spool/ps directory, touch the /var/spool/ps/log file, and make both owned by bin.daemon. lpc start ps and you're off and printing! BTW, this is an Okidate OL 610e/PS I got from WebAuction for $182. The output seems very nice, and the PostScript interpreter seems to handle anything I throw at it, since I crammed a 16Mb FPM SIMM in it. Anyone out there have any Cheers or Jeers for this printer? Please respond via e-mail, since I don't regularly subscribe to questions anymore. -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC http://www.xmission.com/~softweyr softweyr@xmission.com