From owner-freebsd-hackers@freebsd.org Thu Dec 19 19:09:15 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 A4A171E87BB for ; Thu, 19 Dec 2019 19:09:15 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47f1dQ3LHzz41gM; Thu, 19 Dec 2019 19:09:14 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wm1-x32f.google.com with SMTP id b19so6563799wmj.4; Thu, 19 Dec 2019 11:09:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; bh=zfgKDbnccZPtLxxHkGvzAAzaJ62WUodLgMi1Lt3QqZc=; b=irGHiFprim0uevi3CETXGDSm1VLBb5y6zzRaHSOlhnC+VDKSUpI9MpdRt7OZ2YZ6Wg CfeG34tVuaIl/Dm7RvOgQHafh9fab270kVzFuy091QgbJbc5vFgW7IZK29+xy+TzUTNd qLUfkC0ghKaeCbzFWmuT8bGYynXM4Jx+fH6tIOHvzAIw2y2tLONJFs3X95s2dIOEAYow 3s3J8XuKYmbWDZXDkZwpbBi4GrGA/1EaA6tQ4MWvpJKOXwq2u4qiidKY8778wumEMSt1 tLsNtNzVLoozYBwCNLTtjS11UsG469ItElth4HZhc7r1JZgofzDXeb5EW9SDct2cr7Sc qZxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:reply-to:mime-version:content-transfer-encoding; bh=zfgKDbnccZPtLxxHkGvzAAzaJ62WUodLgMi1Lt3QqZc=; b=kYraQ5XrPLeVjTF/Uuv2oSbmP5DG0eOJVbh18z5d9d+ZMMF4/1ykFcoWHdn0ovcxR0 25JIdP5GXFU30ck3xqfN/gT715Xlve58PTOVjnR+AIXve+xfAvLDVRKIlWemCVzppaGm lBMZwDoicbe+IVig1YjyJFaFm4csfbM1nRhUeedUF6fUfZ75yYraC7oGB/mQGkMSKVtY P+NvSRP7SKynyb2hGWsgxOiR5SZMWT1vSAfWy2htg8X9Ba8k0hqCuriC71uo8Gf/ScQt Yulk6tutqFkGTCHBYuLK133dmX9Oy3EYFLtwHhsW8/ZRvUZhkrFjLzis492Sem82gJ9u ekBg== X-Gm-Message-State: APjAAAXNWmWUNZmSerUlUl53uvxBPpv9H25tlOBRn43baflzzAsNI7/r RFesyU1eqBnG59SVKwy1lM5iWJ40 X-Google-Smtp-Source: APXvYqxng91W3HGhpDQvbpxJe5ogwYT+d0shUhnP0DxZTF9ZF25Lsgt65rqsZkqMa6vkA/M5lycRZQ== X-Received: by 2002:a1c:20d6:: with SMTP id g205mr11972024wmg.38.1576782552468; Thu, 19 Dec 2019 11:09:12 -0800 (PST) Received: from ernst.home (p5B3BE980.dip0.t-ipconnect.de. [91.59.233.128]) by smtp.gmail.com with ESMTPSA id a184sm7240376wmf.29.2019.12.19.11.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 11:09:11 -0800 (PST) Date: Thu, 19 Dec 2019 20:09:10 +0100 From: Gary Jennejohn To: Miroslav Lachman <000.fbsd@quip.cz> Cc: Gleb Popov , freebsd-hackers Subject: Re: How to use locale(1) to set default paper size? Message-ID: <20191219200910.07007545@ernst.home> In-Reply-To: References: Reply-To: gljennjohn@gmail.com X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47f1dQ3LHzz41gM X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=irGHiFpr; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of gljennjohn@gmail.com designates 2a00:1450:4864:20::32f as permitted sender) smtp.mailfrom=gljennjohn@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[gljennjohn@gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RECEIVED_SPAMHAUS_PBL(0.00)[128.233.59.91.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[f.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; IP_SCORE(0.00)[ip: (-8.92), ipnet: 2a00:1450::/32(-2.65), asn: 15169(-1.90), country: US(-0.05)]; RCVD_TLS_ALL(0.00)[] 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 19:09:15 -0000 On Thu, 19 Dec 2019 19:53:07 +0100 Miroslav Lachman <000.fbsd@quip.cz> wrote: > 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 :) > Ah, this is good. I also have a4 set in /usr/local/etc/papersize, so that explains why I always get A4 when I start libreoffice without loading a file. Of course, all you need to do is ``echo a4 > /usr/local/etc/papersize'' -- Gary Jennejohn