From owner-freebsd-hackers@freebsd.org Thu Dec 19 18:53:10 2019 Return-Path: Delivered-To: freebsd-hackers@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 B5AAF1E7F65 for ; Thu, 19 Dec 2019 18:53:10 +0000 (UTC) (envelope-from SRS0=/0C1=2J=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (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 47f1Gt4SdSz40j3; Thu, 19 Dec 2019 18:53:10 +0000 (UTC) (envelope-from SRS0=/0C1=2J=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 2F8DF28417; Thu, 19 Dec 2019 19:53:09 +0100 (CET) Received: from illbsd.quip.test (ip-62-24-92-232.net.upcbroadband.cz [62.24.92.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id AD48028416; Thu, 19 Dec 2019 19:53:07 +0100 (CET) Subject: Re: How to use locale(1) to set default paper size? To: Gleb Popov , freebsd-hackers References: From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: Date: Thu, 19 Dec 2019 19:53:07 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47f1Gt4SdSz40j3 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2019 18:53:10 -0000 Gleb Popov wrote on 2019/12/19 12:07: > Hello hackers@ > > When I launch LibreOffice Writer, the default page size is set to "Letter". >>From what I read on Internets, the canonical way to set default paper size > is via locale(1). Many sites propose setting LC_PAPER env var to > ru_RU.UTF-8 to get "A4" as default size. > > On FreeBSD, however, running `locale -ck` doesn't show a category for paper > size and setting LC_PAPER variable doesn't seem to work for LibreOffice. > > Any ideas what can be done about that? Take a look at libpaper and papersize-default-a4 Tha later just create symlink /usr/local/etc/papersize from /usr/local/etc/papersize.a4 https://www.freshports.org/print/libpaper/ https://www.freshports.org/print/papersize-default-a4/ I tried it now and it works for me. I also had Letter in LibreOffice. Now I have A4 as default in LibreOffice with this: # cat /usr/local/etc/papersize a4 So thank you for your question, it solved my problem too :) Kind regards Miroslav Lachman