9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] printer setup & printing?
@ 2002-04-12 15:28 Russ Cox
  2002-04-12 16:27 ` Axel Belinfante
  0 siblings, 1 reply; 3+ messages in thread
From: Russ Cox @ 2002-04-12 15:28 UTC (permalink / raw)
  To: 9fans

>  - what spool files do I need with what permissions?
>    using lp's error messages as directives I now have an 'other'
>    file system on the fs, with the following contents:
>     lp/
>      tmp/
>      log/

If fileserver=kfs, lp is supposed to use /lp
on your kfs.  Look there on a freshly-installed
system:

g% ls -ld lp
d-rwxrwxr-x M 3547 rsc sys 0 May 13  2000 lp
g% ls -l lp
d-rwxrwxrwx M 3547 rsc sys 0 May 13  2000 lp/log
d-rwxrwxrwx M 3547 rsc sys 0 May 13  2000 lp/prob
d-rwxrwxrwx M 3547 rsc sys 0 May 13  2000 lp/queue
d-rwxrwxrwx M 3547 rsc sys 0 May 13  2000 lp/tmp
g% ls -l lp/*
g%

>    with tmp and log permissions:
>
>    d-rwxrwxrwx M 374 axel sys  0 ..........    tmp
>    d-rwxrwxr-x M 374 axel sys  0 ..........    log
>
>    Should log directory also be writable for all?

Yes.

>    with in log the files that lp made, with following permissions:
>
>    a-rw-rw-rw- M 374 axel sys   0 Apr  8 19:51 log/lw17
>    --rw-rw-rw- M 374 axel sys 201 Apr 12 13:40 log/lw17.st
>    a-rw-rw-rw- M 374 axel sys   0 Apr  8 18:54 log/lw17_d
>    --rw-rw-rw- M 374 axel sys 201 Apr 12 15:32 log/lw17_d.st
>    a-rw-rw-rw- M 374 axel sys   0 Apr 12 13:06 log/stdout
>
>    I noticed that the *.st files need to be writable by all,
>    to make things work -- or should they be group-writable
>    and belong to a special group, of which everyone is member?

Since your log directory wasn't world writable,
these weren't either.  I think that was your problem.

>    Should the *.st files have the locking bit set?

Ours don't.  Those are status files not lock files.
Perhaps it would be useful if they did, but no idea.

>  - I noticed that the log files named after the printer (lw17, lw17_d)
>    remain empty. DO I need to enable logging specifically?
>    Or are they only used for 'local' printers?

The latter.

>  - when I print plain (utf) text that contains funny characters
>    (like the euro sign), they show up not as expected.
>    Is there a better way to do this conversion?

What does not as expected mean?  It could be just the font
problem addressed in the final question below.

>  - in acme a plain (utf) page looks nicely formatted using a
>    proportional font; on the printer I get fixed-width and thus
>    changed colums. Can I use proportional font names?
>    (rephrased: what arguments can I use for the lp(1) -f flag?)

I think you can give it any troff font name
from /sys/lib/troff/font/devutf.
You could try LucidaSans.10, perhaps.

>  - our (network, postscript) printers use A4 paper.
>    Do I have to configure that somewhere?

No idea, sorry.

>  - when I use 'man -t man |lp' the (horizontal) interword spacing
>    is wrong (like 'negative': I get words printed over each other,
>    in the list of options the flags and their description are nicely
>    lined up in columns, but in the descriptions the spacing wrong)
>    When I look at 'man -t man |page -w' it looks fine.
>    Some other set-up that I have missed?

Yes, you are not downloading the appropriate fonts
into the printer.

Look in /sys/lib/lp/spooler/lpdspool, and change

@{bind -b $LPLIB/process /bin; $LPPROC} < $j | /$cputype/bin/aux/lpdsend ...

to be

@{bind -b $LPLIB/process /bin; $LPPROC} < $j |
	aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ |
	/$cputype/bin/aux/lpdsend ...

That should work better.  I wonder why that wasn't
already like that.

Russ


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

* Re: [9fans] printer setup & printing?
  2002-04-12 15:28 [9fans] printer setup & printing? Russ Cox
@ 2002-04-12 16:27 ` Axel Belinfante
  0 siblings, 0 replies; 3+ messages in thread
From: Axel Belinfante @ 2002-04-12 16:27 UTC (permalink / raw)
  To: 9fans

> >  - what spool files do I need with what permissions?
> >    using lp's error messages as directives I now have an 'other'
> >    file system on the fs, with the following contents:
> >     lp/
> >      tmp/
> >      log/
>
> If fileserver=kfs, lp is supposed to use /lp on your kfs.

my fileserver is a real fake worm.

>  Look there on a freshly-installed system:
[...]
thanks! seems I have to add queue and prob.

> >  - when I print plain (utf) text that contains funny characters
> >    (like the euro sign), they show up not as expected.
> >    Is there a better way to do this conversion?
>
> What does not as expected mean?  It could be just the font
> problem addressed in the final question below.

Probably. Without the solution you give below, the euro symbols
print as the 'not sign' in /lib/keyboard.
With that solution applied,  they print as 'empty string'
(i.e. no visible/printable symbol appears on the paper).

> >  - our (network, postscript) printers use A4 paper.
> >    Do I have to configure that somewhere?
>
> No idea, sorry.

After applying the fix you mention below, the man page looks
quite decent anyway.

> >  - when I use 'man -t man |lp' the (horizontal) interword spacing
> >    is wrong
[...]

> Yes, you are not downloading the appropriate fonts into the printer.
[fix omitted]
> That should work better.  I wonder why that wasn't already like that.

looks perfect. thanks for the quick reply!

Axel.



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

* [9fans] printer setup & printing?
@ 2002-04-12 14:12 Axel Belinfante
  0 siblings, 0 replies; 3+ messages in thread
From: Axel Belinfante @ 2002-04-12 14:12 UTC (permalink / raw)
  To: 9fans

Some (FA?)Q's about printer setup.
I set up access to our network postscript printers as follows:

lw17   location host lw17   - post+600dpi        generic lpdspool lpd -	- FIFO
lw17_d location	host lw17_d - post+600dpi+duplex generic lpdspool lpd - - FIFO

and using that raises some questions (pointers welcome in case the Q are FA)

 - what spool files do I need with what permissions?
   using lp's error messages as directives I now have an 'other'
   file system on the fs, with the following contents:
    lp/
     tmp/
     log/

   with tmp and log permissions:

   d-rwxrwxrwx M 374 axel sys  0 ..........    tmp
   d-rwxrwxr-x M 374 axel sys  0 ..........    log

   Should log directory also be writable for all?

   with in log the files that lp made, with following permissions:

   a-rw-rw-rw- M 374 axel sys   0 Apr  8 19:51 log/lw17
   --rw-rw-rw- M 374 axel sys 201 Apr 12 13:40 log/lw17.st
   a-rw-rw-rw- M 374 axel sys   0 Apr  8 18:54 log/lw17_d
   --rw-rw-rw- M 374 axel sys 201 Apr 12 15:32 log/lw17_d.st
   a-rw-rw-rw- M 374 axel sys   0 Apr 12 13:06 log/stdout

   I noticed that the *.st files need to be writable by all,
   to make things work -- or should they be group-writable
   and belong to a special group, of which everyone is member?

   Should the *.st files have the locking bit set?

 - I noticed that the log files named after the printer (lw17, lw17_d)
   remain empty. DO I need to enable logging specifically?
   Or are they only used for 'local' printers?

 - when I print plain (utf) text that contains funny characters
   (like the euro sign), they show up not as expected.
   Is there a better way to do this conversion?

 - in acme a plain (utf) page looks nicely formatted using a
   proportional font; on the printer I get fixed-width and thus
   changed colums. Can I use proportional font names?
   (rephrased: what arguments can I use for the lp(1) -f flag?)

 - our (network, postscript) printers use A4 paper.
   Do I have to configure that somewhere?

 - when I use 'man -t man |lp' the (horizontal) interword spacing
   is wrong (like 'negative': I get words printed over each other,
   in the list of options the flags and their description are nicely
   lined up in columns, but in the descriptions the spacing wrong)
   When I look at 'man -t man |page -w' it looks fine.
   Some other set-up that I have missed?

 - just a note: to get my face on the banner page, I made the following change:

   diff /n/dump/2002/0412/sys/lib/lp/process/hpost /sys/lib/lp/process/hpost
   35,36c35,38
   < 	facedom=`{awk '/^'$LPMACHID'	/{print $2}' /lib/face/.machinelist}
   < 	if (~ $#facedom 0) facedom=astro
   ---
   > 	if (~ $#facedom 0) {
   > 		facedom=`{awk '/^'$LPMACHID'	/{print $2}' /lib/face/.machinelist}
   > 		if (~ $#facedom 0) facedom=astro
   > 	}

 - and another note: to make it possible to set LPUSERID in lib/profile
   (to avoid having to use -u in the print commands), I changed:

   diff /n/dump/2002/0412/rc/bin/lp /rc/bin/lp
   59c59
   < LPUSERID=$THIS_USERID
   ---
   > if (~ $#LPUSERID 0) LPUSERID=$THIS_USERID


Thanks and Regards,
Axel.



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

end of thread, other threads:[~2002-04-12 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-12 15:28 [9fans] printer setup & printing? Russ Cox
2002-04-12 16:27 ` Axel Belinfante
  -- strict thread matches above, loose matches on Subject: below --
2002-04-12 14:12 Axel Belinfante

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).