From owner-freebsd-questions@freebsd.org Wed May 6 08:25:26 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3998713ADC9 for ; Wed, 6 May 2020 08:25:26 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49H8mP0x5lz4K2J for ; Wed, 6 May 2020 08:25:24 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.27.16]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPA (Nemesis) id 1MjSPq-1iq0vA2YDC-00kwB0; Wed, 06 May 2020 10:25:22 +0200 Date: Wed, 6 May 2020 10:25:21 +0200 From: Polytropon To: Victor Sudakov Cc: freebsd-questions@freebsd.org Subject: Re: Brother HL-L2340D printer and lpd? Message-Id: <20200506102521.a6c47f8f.freebsd@edvax.de> In-Reply-To: <20200506022131.GB56526@admin.sibptus.ru> References: <20200503171259.GA48627@admin.sibptus.ru> <20200505161952.GA34844@admin.sibptus.ru> <20200505185510.00b622e3.freebsd@edvax.de> <20200505180101.GA35751@admin.sibptus.ru> <20200505202331.53374f21.freebsd@edvax.de> <20200506022131.GB56526@admin.sibptus.ru> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:mU+wiPd45maUj2kKL62Nh+NstT3eLj8I1a1KzpiBfvozck1PcLI wpMljz6P6cpfdVeWVaE8bC8DRTM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7yExGeu3zn X-Rspamd-Queue-Id: 49H8mP0x5lz4K2J X-Spamd-Bar: +++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.131) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [5.76 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[16.27.222.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.97)[0.971,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[131.126.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[131.126.227.212.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.38)[ip: (1.11), ipnet: 212.227.0.0/16(-1.20), asn: 8560(2.03), country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2020 08:25:26 -0000 On Wed, 6 May 2020 09:21:31 +0700, Victor Sudakov wrote: > Polytropon wrote: > > [dd] > > > > > > 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-1.1.24.4 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 ") 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 > texts. 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 > avail. 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. ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...