Re: magicfilter and smbprint together?

1997-05-11 Thread Carey Evans
Colin Telmer [EMAIL PROTECTED] writes:

[snip]

 #!/bin/sh -x
 (
 # NOTE You may wish to add the line `echo translate' if you want automatic
 # CR/LF translation when printing.
 echo translate
 echo print -
 cat
 ) | /usr/sbin/ljet3-filter | /usr/bin/smbclient MAIN\\HPLIII -N -P  
 /var/log/smb-print.log
 
 I thought this would work perfectly, but I'm wrong as when I tried
 lpr -Prlp test.dvi
 the printer down the hall started pumping out pages with junk all over
 them. Am I missing something or is there a better correct way to do this?

[snip]

DVI files start with the bytes \367\002, which is how magicfilter
identifies them.  However, the first two bytes you send to
ljet3-filter are tr, so it assumes you're sending plain text.  As
I've discovered myself, DVI's don't print very well this way.

Something like the following should work better.  Also, are you sure
you want to do CR/LF translation in this case?  ljet3-filter doesn't.
The $@ passes on the options from lpd to magicfilter, as documented
at the top of magicfilter(8).

#!/bin/sh -x
(
echo translate
echo print -
/usr/sbin/ljet3-filter $@
) | /usr/bin/smbclient '\\MAIN\HPLIII' -N -P  /var/log/smb-print.log

-- 
Carey Evans  *  [EMAIL PROTECTED]

Encryption renamed to Encode to avoid US regulation problems
 - include/linux/wireless.h in Linux 2.0.30 kernel


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: magicfilter and smbprint together?

1997-05-11 Thread Colin Telmer
-BEGIN PGP SIGNED MESSAGE-

On 11 May 1997, Carey Evans wrote:

 Something like the following should work better.  Also, are you sure
 you want to do CR/LF translation in this case?  ljet3-filter doesn't.
 The $@ passes on the options from lpd to magicfilter, as documented
 at the top of magicfilter(8).
 
 #!/bin/sh -x
 (
 echo translate
 echo print -
 /usr/sbin/ljet3-filter $@
 ) | /usr/bin/smbclient '\\MAIN\HPLIII' -N -P  /var/log/smb-print.log

Thanks for the help. For future reference, the CR/LF translation should
_not_ be in the script as magicfilter takes care of that itself. One other
note, I could not find a reference to $@ in my manpage for magicfilter
(Version 1.2 March 1996). Cheers, Colin.

- --
  Colin R. Telmer, Institute of Intergovernmental Relations
School of Policy Studies, Queen's University
 Kingston, Ontario, Canada, K7L-3N6
  (613)545-6000x4219   [EMAIL PROTECTED]
 PGP Fingerprint = 09 E9 DA 66 9C EE 33 DC  B8 3B 97 0E 01 BC EC 0B
   PGP Public Key at URL:http://terrapin.econ.queensu.ca


-BEGIN PGP SIGNATURE-
Version: 2.6.3ia
Charset: noconv

iQCVAwUBM3XjFRhhzOJJktw1AQFdUwQAmfFDykw4Lq2apvo1c9AVi3uFYk0Lb0Wt
7y4YufZrJVibGUnR62J2tx7rDOw32QqTuea/JwZMLgA5JxrUbNTgeCNpIzMC/O51
sAtmpPTLAVQdaL9GyXys9dP673x/ODI/PJwYr/zBGxJa8gLVk+ts56dXzr3EEHJh
Ln13525Ox7g=
=koe1
-END PGP SIGNATURE-


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


Re: magicfilter and smbprint together?

1997-05-11 Thread Karl M. Hegbloom
 Colin == Colin Telmer [EMAIL PROTECTED] writes:

Colin  One other note, I could not find
Colin a reference to $@ in my manpage for magicfilter.

 Try the `bash` manual for that one.

-- 
Karl M. Hegbloom [EMAIL PROTECTED]
http://www.inetarena.com/~karlheg
Portland, OR  USA
Debian GNU 1.2  Linux 2.1.36 AMD K5 PR-133


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .


magicfilter and smbprint together?

1997-05-10 Thread Colin Telmer
-BEGIN PGP SIGNED MESSAGE-

I have recently figured out how to print from my debian machine to a win95
printer using lpr and the input filter smbprint as follows:

rlp|Remote printer entry:\
:cm=HPLIII printer in IIGR 301:\
:lp=/dev/rlp:\
:sd=/var/spool/lpd/remote:\
:af=/var/log/rlp-acct:\
:lf=/var/log/rlp-errs:\
:mx#0:\
:if=/usr/local/bin/smbprint:\
:sh:

However, I also would like to use the ljet3-filter supplied with
magicfilter. I read in the Printing-HOWTO about double queueing but I
thought the following solution would be simpler (although it doesn't seem
to work:)) - put the ljet3-filter inside of the smbprint script (note that
I have an extremely simple smbprint script that is similar to the one
supplied with samba, but it has the win95 info hard-coded)

- --old smbprint:
#!/bin/sh -x
(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
echo translate
echo print -
cat
) | /usr/bin/smbclient MAIN\\HPLIII -N -P  /var/log/smb-print.log

- --new smbprint:
#!/bin/sh -x
(
# NOTE You may wish to add the line `echo translate' if you want automatic
# CR/LF translation when printing.
echo translate
echo print -
cat
) | /usr/sbin/ljet3-filter | /usr/bin/smbclient MAIN\\HPLIII -N -P  
/var/log/smb-print.log

I thought this would work perfectly, but I'm wrong as when I tried
lpr -Prlp test.dvi
the printer down the hall started pumping out pages with junk all over
them. Am I missing something or is there a better correct way to do this?


Cheers, Colin

- --
  Colin R. Telmer, Institute of Intergovernmental Relations
School of Policy Studies, Queen's University
 Kingston, Ontario, Canada, K7L-3N6
  (613)545-6000x4219   [EMAIL PROTECTED]
 PGP Fingerprint = 09 E9 DA 66 9C EE 33 DC  B8 3B 97 0E 01 BC EC 0B
   PGP Public Key at URL:http://terrapin.econ.queensu.ca


-BEGIN PGP SIGNATURE-
Version: 2.6.3ia
Charset: noconv

iQCVAwUBM3TyJhhhzOJJktw1AQFqlgP+Pn3qrqyxOC4hPo63Dxs35kyiH9HBnBp+
bwQ1Og/KlpPsXvHuR+iqNOP9IqIBB0mMDoOdC08b1YQLrJecsQN0U70bMppz4GWv
UTaKiUQdDFFuqkFc/Obx5An9YJIW74tpf1EHjRB+m5FxwG0x6+61rBAn1aHuWrAc
s7Qq8FjoALc=
=4Yg/
-END PGP SIGNATURE-


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .