Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 May 1997 17:00:19 +1000
From:      Robert <robert@chalmers.com.au>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Deskjet, Cannon, Printing options. and Tape Backup QIC
Message-ID:  <33893503.67E8@chalmers.com.au>

next in thread | raw e-mail | index | archive | help
Hi,
Found a few things on printing you might be interested in, at least 
someone said others may find useful. Anyway, I have the following
in my printcap file;

I run a Deskjet 694c, a Cannon Bubblejet 330, 
and an ancient Star NX1000.

I am using a slightly modified lp-bjif file given to me by someone
some time back. Sorry, cant find your name now if you recognise
the code. It has been very useful though. Short, and to the point.

Firstly; the Printcap file.

# Do also refer to section 7 (Printing) of the handbook.  A local copy
# can be found under /usr/share/doc/handbook/handbook.{html,latin1}.
#
rattan|line|cannon|cannon printer:\
        :sh:sd=/var/spool/lpd/rattan:\
        :lp=/dev/lpt0:\
        :pw=80:pl=66:\
        :if=/usr/local/bin/lp-bjif:\
        :lf=/var/log/lpd-errs:

cd|cond|desk-cond printer:\
        :sh:sd=/var/spool/lpd/rattan:\
        :lp=/dev/lpt0:\
        :pw=80:pl=66:\
        :if=/usr/local/bin/lp-cond:\
        :lf=/var/log/lpd-errs:
#
# Star is connected via the other server. So this entry refers to that.
#
star|lp|line|star 1000:\
        :lp=:\
        :rm=nanguo:\
        :rp=star:\
        :sd=/var/spool/output/lpd:\
        :lf=/var/log/lpd-errs:
  



These are fairly straight forward. Now the control files for rattan,
both normal and condensed are ;

For the "normal, Cannon Bubble jet 330", and for the HP-Deskjet 694c;
in a file called /usr/local/bin/lp-bjif

#!/usr/local/bin/perl
#
# Cannon BJ & HP Deskjet
#

while (<STDIN>) {

    $_ =~ s/\n/\r\n/g ;
    print $_ ;

}

print "\f" ;
#



For the Condensed Mode, on the Deskjet, (models 500 up actually)
This one switches it into condensed mode, prints it, then resets the
printer, then formfeeds the page.
I suspect these work on the Cannon to, but havent tried it yet.
The Deskjet understands PCL it seems, and if you look on HP.COM's
page, you'll find the printer manual for Deskjet 500's. This contains
all the codes you would ever need.

#!/usr/local/bin/perl
#
# 
#
print "\033\&k2S" ;
while (<STDIN>) {

    $_ =~ s/\n/\r\n/g ;
    print $_ ;

}
print "\033\&E" ;
print "\f" ;
#
# EOF



Now, someone also asked about Tape backup. I have some her you might be
able to use also. A QIC-150 (to 525) SCSI. Works a treat, so long as
I back up across the network. Its a DOG trying to back up the machine
it's on. But I found a way arouund that to...

On the server, I have in my own user directory a set of files called
dump.xxxx whatever. These I use to backup across the network to a 
machine that idles away, as a secondary, SSL server, and TapeDumper!
It does play up occassionally, and actually takes two tapes now, but
it does work. If I use 1 525Mb tape for each file system, its fine.
Comment out one line at a time.

#!/bin/sh
#dumps var and user to one, 525Mb tape.
/sbin/rdump 0ufB ruby:/dev/nrst0 525000 /var
/sbin/rdump 0ufB ruby:/dev/nrst0 525000 /usr
rsh ruby mt -f /dev/nrst0 rewind
echo "Tape dump complete"

This one does a cpio type backup of a directory; A bit painful, but
it does work;

#!/bin/sh
# use remote tape to backup local host
(cd /usr/local/etc; find . -print | cpio -oc) | rsh ruby "dd
of=/dev/rst0 bs=20b
"
echo "Done archiving nanguo:/usr/local to ruby:rst0"



Now, for dumping the devices that the tape drive actually lives on,
I had to experiment for AGES,so that the tape wouldn't "shoeshine", to
get;

#Dump /u file system to 150Mb tape
dump 0ufBb - 150000 10 /u | team 1m 10 > /dev/nrst0
mt -f /dev/nrst0 rewind
echo "Dump Done"   




Of course, (he says of course!), you have to make sure that rhosts is
set up on the other machine, for network dumping to work. And hosts.lpd
to get printing working. 

Hope thats of help to some folks, and I would also like to say MANY 
THANKS to those patient souls who have helped me thus far.

cheers,
Bob
~                           


-- 
http://www.chalmers.com.au Books-New & Secondhand  Support Whirled Peas.
Agents for CIBTC. Associate of Amazon.com, and Partner Program with iBS.
Books about China, books from China.         Sheng huo jiu shi dou zheng
Business Links in Dalian, and Beijing.          Building the China Trade



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33893503.67E8>