From owner-freebsd-questions@freebsd.org Wed May 6 02:21:33 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 311342DC6E6 for ; Wed, 6 May 2020 02:21:33 +0000 (UTC) (envelope-from vas@sibptus.ru) Received: from admin.sibptus.ru (admin.sibptus.ru [IPv6:2001:19f0:5001:21dc::10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49H0hX52K9z3M0H for ; Wed, 6 May 2020 02:21:32 +0000 (UTC) (envelope-from vas@sibptus.ru) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=In-Reply-To:Message-ID:Subject:To:From:Date; bh=LIcfv/Fg+F4SowcvQEhX5ZcSG7bf5hyq3MOn69Pp7Kg=; b=kDXkbW4tC7/zn5mmzXAV6/QbLy 9LaSvCFsDvPJIvXUsLfnU4LjfQvz7fWT1aGvRRSXy/twI7H19D3m4tBUWTlfgPog0MFac07YGKJjC 9p30bTKL8y8s50JcSJaULoMq9MJQVyqi7bZ9cNIBkbC1WpmlWnIbfbPhmXo640SMwz0E=; Received: from vas by admin.sibptus.ru with local (Exim 4.93.0.4 (FreeBSD)) (envelope-from ) id 1jW9gh-000FJ6-Op; Wed, 06 May 2020 09:21:31 +0700 Date: Wed, 6 May 2020 09:21:31 +0700 From: Victor Sudakov To: Polytropon Cc: freebsd-questions@freebsd.org Subject: Re: Brother HL-L2340D printer and lpd? Message-ID: <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KFztAG8eRSV9hGtP" Content-Disposition: inline In-Reply-To: <20200505202331.53374f21.freebsd@edvax.de> X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 X-Rspamd-Queue-Id: 49H0hX52K9z3M0H X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=sibptus.ru header.s=20181118 header.b=kDXkbW4t; dmarc=pass (policy=none) header.from=sibptus.ru; spf=pass (mx1.freebsd.org: domain of vas@sibptus.ru designates 2001:19f0:5001:21dc::10 as permitted sender) smtp.mailfrom=vas@sibptus.ru X-Spamd-Result: default: False [-7.31 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[sibptus.ru:s=20181118]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[sibptus.ru:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[sibptus.ru,none]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5000::/38, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-3.21)[ip: (-9.89), ipnet: 2001:19f0:5000::/38(-4.94), asn: 20473(-1.19), country: US(-0.05)] 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 02:21:33 -0000 --KFztAG8eRSV9hGtP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Polytropon wrote: [dd] > > > > Now two questions are left: > > > >=20 > > > > 1. How the heck do I print text files with this setup? Should I con= vert > > > > them to PostScript first, and how? UTF-8 Cyrillic support is crucia= l. > > >=20 > > > 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. > > >=20 > > > The easiest way to do this is the port "a2ps" (ASCII to > >=20 > > a2ps from packages is broken: > >=20 > > $ a2ps /etc/rc.conf > > a2ps: unknown medium `libpaper' >=20 > 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. And I really think if a2ps does not have UTF-8/Cyrillic support, there is not much sense for me to try and fix it. [dd] > > > Personally, I use "encript" for turning ASCII reports > >=20 > > enscript is good, but it has huge problems with Cyrillic, and is totally > > lacking multibyte support (UTF-8). >=20 > 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. > > > > 2. How do I convince Mozilla Firefox that I now have a PostScript > > > > printer and it can print directly to it, not just to a PDF file? It= does > > > > not seem to care for /etc/printcap. [dd] > >=20 > > Oh! I wish I knew how to add something to Firefox's print dialog!=20 > > Do you? >=20 > 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. >=20 > Another idea might be to use the variable $PRINTER to name > the printer before starting Firefox.=20 Does not help either.=20 I've also tried tinkering with print.printer_list in about:config to no avail. >=20 > Currently I don't have access to a system that has both > Firefox and lpr installed so I cannot verify this suggestion. Anyone any ideas please? --=20 Victor Sudakov, VAS4-RIPE, VAS47-RIPN 2:5005/49@fidonet http://vas.tomsk.ru/ --KFztAG8eRSV9hGtP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJesh8rAAoJEA2k8lmbXsY0KGMH/jLzp23REQYxQrtYVmzC9U4J qeI6IFLMmha/2dN2T7fE2L1CuvveTYm1wGeKHj3ZH11bNPMxgF0LV1MQa8HRN1kV Enc7qNFWpBPOjOUusiguwSxFo/SwVtfwpY39QvuvwZUh4Y7SjsPpBlsHAEyZqtvs 7ldLDEFojWeYKg/dUueF0ev3QGpQo6WgkapxtDIF1FSyCP9t8lmbfAhfshjdP8VO OBWb52dEtz8lUwayo0Sl6GmkI8HCBpLz67wPRd0j9t0ZBpATU/CkI52m/BSCSnCb tc9kZshapWnxPcz1yFi6AyfsSIOWd48Xs0LIyYE1pd50bDToCjqiSDWZfP8mISI= =t7O1 -----END PGP SIGNATURE----- --KFztAG8eRSV9hGtP--