*BSD News Article 31003


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!ihnp4.ucsd.edu!usc!howland.reston.ans.net!darwin.sura.net!paladin.american.edu!constellation!rex!ben
From: ben@rex.uokhsc.edu (Benjamin Z. Goldsteen)
Subject: Re: 386BSD: lpr does not work.
Message-ID: <CqL285.8ro@rex.uokhsc.edu>
Date: Sun, 29 May 1994 21:26:29 GMT
Reply-To: benjamin-goldsteen@uokhsc.edu
References: <2s52m3$9s8@debbie.cc.nctu.edu.tw>
Organization: Health Sciences Center, University of Oklahoma
Lines: 63

u8123555@cc.nctu.edu.tw (I-Fei Tsai) writes:

>Hi:
>	I have a 386BSD installed on my 386DX, but the "lpr" doesn't work:

You really ought to be using FreeBSD or NetBSD...

>	(*) I have no mouse, modem ... installed, only a line printer.  
>	(*) When I boot from the DOS partition, I can "COPY <filename> PRN"
>	    to print my file.
>	(*) If I boot from the 386BSD partition, when I type "lpr <filename>"
>	    I find that the file is queued in the printer queue, "lpc" shows
>	    the printer is ready and printing. But nothing comes out from the
>	    printer.

>	I have tried "ln -s /dev/com1 /dev/lp", doesn't work ..., is it
>	the correct way ?  Is there any thing to do with the com driver ?

>	Thank you in advance.

There is a little more to it then that...

1.You need to know what port your printer is on: DOS's "PRN" device
  defaults to a parallel port unless you use MODE to change it. 
  386BSD's "/dev/com1" device is a serial port.

2.You need to make sure that the device is working at all: You need to
  get "cat SOME_FILE > /dev/MY_PRINTER" working before "lpr" is going
  to work.  I am not sure what the MY_PRINTER should be for 386BSD on
  your computer.  My printer is on DOS's LPT1 which is FreeBSD 1.1's
  /dev/lpt0 (getting this right for 386BSD on your computer may require
  rebuilding the kernel)

3.You probably ought to look in/understand "/etc/printcap".  You may
  need to play with some parameters (if you are using a serial printer,
  you may need to configure the serial ports in /etc/printcap; you may
  want to turn off burst pages; etc).  I would recommend giving your
  printer a name (maybe "myepson"), and then give it the "lp" alias to
  make it the default.  I would also recommend setting the "lp" string
  to the actual device rather than making the symbolic link
  ("lp=/dev/lpt0" or "lp=/dev/tty00").  For example:

myepson|lp|My Epson LX-80:\
	:lp=/dev/lpt0:\
	:sh:\
	:pw=80:pl=66:\
	:sd=/usr/spool/lpd/myepson:\
	:lf=/var/log/lpd-errs:

[I assume this works...I am doing this off the top of my head]

  You might then get fancy and setup filters, accounting, and so
  forth...


After you get #2 working, it should all fall into place -- the defaults
in /etc/printcap may be correct and if anything is wrong it should be
easy to determine and fix.


Good Luck!
-- 
Benjamin Z. Goldsteen