[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

deskwriter setup success WAS: Re: deskwriter driver, or set up



well, i just finished printing my first page under linux os :D looks
like crap (dot-martix quality, at econo setting....), but it works.

i'll post the various settings and other stuff for archival purposes.

settings and scripts:

/usr/bin/deskwriter-filter:

#!/usr/bin/perl
#
# The above line should really have the whole path to perl
# This script must be executable: chmod 755 filter
while(<STDIN>){chomp $_; print "$_\r\n";}; print "\f";
# You might also want to end with a form feed: print "\f";

simple code from the linux printing HOWTO;

you need this filter proggie cuz other wise the printer starts printing
things staggered
		like 
			so,
instead of 
line 
by 
line
like so.

and you need the form feed (\f), otherwise the sheet stops advancing
when the printer has finished the job. my serial port config seems to be
ok set at the default. i tested /etc/init.d/etc-setserial with a line
like this in /etc/serial.conf:

/dev/ttyS1 uart unknown port 0xc4968000 irq 16 baud_base 0 spd_normal

and the computer locked up. so i.e., DO NOT DO THIS!

this particular setup i got from the output of setserial -g /dev/ttyS1 -
on a powermac 7500. 

i found out which serial port the printer port (under macos) was by:

stty 57600 raw -echo crtscts </dev/ttyS1
echo -en "This is a test-text-line\f" >/dev/ttyS1

and alternating /dev/ttyS0 with /dev/ttyS1. i quickly found out which
was which :) when my printer started spitting out text (for the first
time under linux ever). so on a 7500:
/dev/ttyS0 is the "modem port";
and
/dev/ttyS1 is the "printer port" 
(seen by looking at the little icons on the back of the computer - i say
this in such a way for the real newbies who may read this: hopefully i'm
not talking down :).

/etc/printcap:

lp|deskwriter:\
	:lp=/dev/ttyS1:\
	:sd=/var/spool/lpd/deskwriter:\
	:mx#0:\
	:af=/var/spool/lpd/deskwriter.desc:\
	:sh:\
	:sf:\
	#:lp=/dev/printerport:\
	:lf=/var/log/lpd-errs:\
	:if=/usr/bin/deskwriter-filter: 

deskwriter.desc from linuxprinting.org, deskjet description file (as per
suggestions from various list members :D). i won't put description, 
since it's very long. 

1. go to http://www.linuxprinting.org/
2. go to printer driver listings, and the deskjet entry
3. generate a description file (edit to liking/needs)

i also generated a PPD file, tho i dunno if i'll need it (JIC i do need
it, i generated one).

hope this helps someone else someday :D

simon



Reply to: