9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] How to set up printing
@ 2014-06-28 11:01 Aram Hăvărneanu
  2014-06-28 11:18 ` Aram Hăvărneanu
  0 siblings, 1 reply; 4+ messages in thread
From: Aram Hăvărneanu @ 2014-06-28 11:01 UTC (permalink / raw)
  To: 9fans

I have a networked PostScript printer that speaks LPR.  I have no idea
how to make it work in Plan 9.

I have edited /sys/lib/lp/devices and added:

    # Lexmark X203N
    lexmarkx203n - - x203n - post+600dpi generic lpdspool lpd - -

Of course I can ping x203n.

When I do

    troff -ms /sys/doc/backup.ms | lp -D -dlexmarkx203n

this happens:

    grep '^lexmarkx203n[ ]' /sys/lib/lp/devices
    date
    test -e /sys/lib/lp/log/lexmarkx203n
    bind -b /sys/lib/lp/spooler /bin
    lpdspool
    bind -b /sys/lib/lp/process /bin
    /386/bin/aux/lpdsend -dx203n -tf -Hcwfs64x -Param -
    generic
    cat
    file /tmp/lp107693
    /sys/lib/lp/process/tr2post
    echo ''
    awk -F, '{ n=split($0, a, ","); for (i=1;i<=n;i++) print a[i]; }'
    /sys/lib/lp/process/hpost
    eval /386/bin/aux/tr2post '' '' -c1 '' '' -pp '' '-P''%%Patch from lp
    %%EndPatch from lp
    '''
    date
    /386/bin/aux/tr2post -c1 -pp '-P%%Patch from lp
    %%EndPatch from lp
    '
    awk '{ if(match("cwfs64x", $1)) {print $2; exit}}' /lib/face/.machinelist
    awk '/^cwfs64x\/aram /{print $2}' /lib/face/48x48x8/.dict
    awk '/^cwfs64x\/aram /{print $2}' /lib/face/48x48x4/.dict
    awk '/^cwfs64x\/aram /{print $2}' /lib/face/48x48x2/.dict
    awk '/^cwfs64x\/aram /{print $2}' /lib/face/48x48x1/.dict
    test -f /lib/face/48x48x1/u/unknown.1
    test -r /lib/face/48x48x2/u/unknown.1
    cat
    cat
    cat
    exit ''
    exit
    wait
    rm -f /tmp/lp107693
    exit
    rm -f /tmp/lp107693
    exit
    exit 'lpdspool 107692: |lpdsend 107695: 1'
    exit ''

There is no effect on the printer.

I can use this printer on Linux, BSD and OS X through LPR + generic
postscript driver (no special Lexmark drivers).

What to do?

Thanks,

-- 
Aram Hăvărneanu



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] How to set up printing
  2014-06-28 11:01 [9fans] How to set up printing Aram Hăvărneanu
@ 2014-06-28 11:18 ` Aram Hăvărneanu
  2014-06-28 11:28   ` Aram Hăvărneanu
  2014-06-28 11:29   ` David du Colombier
  0 siblings, 2 replies; 4+ messages in thread
From: Aram Hăvărneanu @ 2014-06-28 11:18 UTC (permalink / raw)
  To: 9fans

I have this in /sys/lib/lp/log/lexmarkx203n.s

connecting to tcp!-!printer
 trying from port 721...failed
 trying from port 722...failed
 trying from port 723...failed
 trying from port 724...failed
 trying from port 725...failed
 trying from port 726...failed
 trying from port 727...failed
 trying from port 728...failed
 trying from port 729...failed
 trying from port 730...failed
 trying from port 731...failed
Cannot open a valid port!
-  All source ports [721-731] may be busy.
-  Is recipient ready and online?
-  If all else fails, cycle the power!

That doesn't look right, so I changed /sys/lib/lp/devices to read

# Lexmark X203N
lexmarkx203n - x203n x203n - post+600dpigeneric generic lpdspool lpd - -

connecting to tcp!x203n!printer
 trying from port 721...connected
: 72.11% sent
: 100.00% sent
11360 bytes sent, status: waiting for end of job
11360 bytes sent, status: end of job

Now it did work!

However it prints a "helpful" first page with my name (this presumably
should contain details about the print job).  Can I disable this
feature?

Also, I tried to print a Plan 9 paper and the font is all wrong.  I
guess the printer doesn't have the correct fonts.  What to do in this
case?

Thanks,

-- 
Aram Hăvărneanu



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] How to set up printing
  2014-06-28 11:18 ` Aram Hăvărneanu
@ 2014-06-28 11:28   ` Aram Hăvărneanu
  2014-06-28 11:29   ` David du Colombier
  1 sibling, 0 replies; 4+ messages in thread
From: Aram Hăvărneanu @ 2014-06-28 11:28 UTC (permalink / raw)
  To: 9fans

This works:

addpsfonts /sys/doc/backup.ps | lp -H -dlexmarkx203n

Thanks David.

-- 
Aram Hăvărneanu



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] How to set up printing
  2014-06-28 11:18 ` Aram Hăvărneanu
  2014-06-28 11:28   ` Aram Hăvărneanu
@ 2014-06-28 11:29   ` David du Colombier
  1 sibling, 0 replies; 4+ messages in thread
From: David du Colombier @ 2014-06-28 11:29 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Also, I tried to print a Plan 9 paper and the font is all wrong.  I
> guess the printer doesn't have the correct fonts.  What to do in this
> case?

You should pipe your PostScript file through the addpsfonts
command to embed the required fonts.

--
David du Colombier



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-28 11:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-28 11:01 [9fans] How to set up printing Aram Hăvărneanu
2014-06-28 11:18 ` Aram Hăvărneanu
2014-06-28 11:28   ` Aram Hăvărneanu
2014-06-28 11:29   ` David du Colombier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).