Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Printing on a NeXT Laser Printer from Windows or Linux

The great thing about NeXT laser printers is that they are practically free, and in my experience, the quality is perfect for what I need.

I could not come up with a working printcap entry for Linux, so instead, I designate an easy-to-type directory (/p) as the ``spool directory'', and the NeXT machine polls it every minute or so to see if there is anything to print. Yes, it's a kludge, but what else does the machine have to do, and who else is going to be printing at the same time? (There should at least be file locking in a multi-user or naïve-user environment.)

The following shell script runs on the NeXT machine once after it boots up:

#!/bin/sh -u
echo 'starting up lame spooler . . .'
echo    mount josp3:/p /p
        mount josp3:/p /p
echo    '/jos/bin/watchToPrint >& /tmp/watchToPrint.log &'
        /jos/bin/watchToPrint >& /tmp/watchToPrint.log &
(josp3 is my Linux box.) Below is watchToPrint:

#!/bin/csh -f

if ($#argv == 0) then
        set del = 120
else
        set del = $1
endif

while (1)
     /jos/bin/printToPrint
     sleep $del
end
and finally printToPrint:
#!/bin/csh -f

cd /p

foreach file (*)
     lpr $file
     /bin/mv $file /Printed
end
A neat benefit of this simple printing scheme is that a copy of everything I've printed accumulates in the /Printed directory on the NeXT machine. Of course, the 330MB hard drive regularly fills up at which time I delete everything in /Printed. However, it can be very convenient for a quick reprint, such as after a paper jam, or when I forgot to insert letterhead in the bypass tray, etc.

Isn't wonderful how easy it is to cobble together something useful in UNIX?


Next  |  Prev  |  Up  |  Top  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Download mycomputers.pdf
[Comment on this page via email]

``My Computers'', by Julius O. Smith III, Web document.
Copyright © 2015-11-29 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA