Brother HL-L2340D printer and lpd?
freebsd at edvax.de
Wed May 6 08:25:26 UTC 2020
On Wed, 6 May 2020 09:21:31 +0700, Victor Sudakov wrote:
> Polytropon wrote:
> > > > > Now two questions are left:
> > > > >
> > > > > 1. How the heck do I print text files with this setup? Should I convert
> > > > > them to PostScript first, and how? UTF-8 Cyrillic support is crucial.
> > > >
> > > > Yes, gs expects PS as its input. For programs that print
> > > > (except here: Firefox), PS is the default output anyway.
> > > > But if you have ASCII text, you need to turn it into PS.
> > > >
> > > > The easiest way to do this is the port "a2ps" (ASCII to
> > >
> > > a2ps from packages is broken:
> > >
> > > $ a2ps /etc/rc.conf
> > > a2ps: unknown medium `libpaper'
> > Install "libpaper" package and manually set a symlink in
> > /usr/local/etc: papersize -> papersize.a4 for standard ISO A4
> > paper, or papersize -> papersize.letter for US letter.
> The package is installed and the files are present:
> $ pkg info -o libpaper
> libpaper-220.127.116.11 print/libpaper
> $ file /usr/local/etc/papersize.*
> /usr/local/etc/papersize.a4: ASCII text
> /usr/local/etc/papersize.letter: ASCII text
> This does not work.
I just verified it is working. Just set the symlink accordingly.
% cd /usr/local/etc/
% ll papersize*
lrwxr-xr-x 1 root wheel 12 2020-05-05 20:19:55 papersize@ -> papersize.a4
-rw-r--r-- 1 root wheel 3 2019-05-16 03:07:27 papersize.a4
-rw-r--r-- 1 root wheel 7 2019-05-16 03:07:27 papersize.letter
Seems that I already had libpaper installed, but the symlink to
make it work was missing. Yes, I used truss to discover it. ;-)
> > > > Personally, I use "encript" for turning ASCII reports
> > >
> > > enscript is good, but it has huge problems with Cyrillic, and is totally
> > > lacking multibyte support (UTF-8).
> > Correct. That's why I had to use it with ISO-8859-1 standard
> > western europe character set (single byte per symbol) in order
> > to get Umlauts displayed correctly. Maybe another processing
> > step ("recode utf-8..koi8 <file>") can be used in the printer
> > filter.
> Too much info (too many glyphs) are lost this way. I'm already used to
> non-koi8-compatible characters in my texts, even when they are plain
That might be a problem due to this kind of tools not having
entered the era of multibyte encoding... :-)
> > > Oh! I wish I knew how to add something to Firefox's print dialog!
> > > Do you?
> > If you define several printers in /etc/printcap (and not
> > forget to run cap_mkdb), a system running lpr should have
> > the available printers listed in Firefox's print dialog.
> > Unless, of course, Firefox is hard-wired with CUPS, and
> > no CUPS - no printer selection.
> Looks like it's hardwired with GTK, and GTK is hardwired with
> something else, and nobody knows any more how it all works.
Yes, that is problematic. On the system I use CUPS, and I get
the printer selection as intended. But installing CUPS for the
purpose of not intentionally using it doesn't seem right.
> > Another idea might be to use the variable $PRINTER to name
> > the printer before starting Firefox.
> Does not help either.
It should. If Firefox just writes to lpr, lpr should use $PRINTER
(as per "man lpr"); depending on your shell, try to set the variable
in the shell's configuration file, re-login, and it should work.
> I've also tried tinkering with print.printer_list in about:config to no
That's not a surprise to me: many things that are supposed to work
or have been working in the past have now been greatly disimproved
due to Linuxisms and YAGNI. ;-)
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions