From owner-freebsd-hackers@freebsd.org Thu Dec 19 18:53:02 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 5C0B21E7F3E for ; Thu, 19 Dec 2019 18:53:02 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) (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 47f1Gk1sbMz40db; Thu, 19 Dec 2019 18:53:02 +0000 (UTC) (envelope-from gljennjohn@gmail.com) Received: by mail-wr1-x42f.google.com with SMTP id w15so7080095wru.4; Thu, 19 Dec 2019 10:53:01 -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=VGVnZqDZJmo0g4SqAnUhbbL2Xw1cSFPmCshRh9thmWY=; b=uOEWtshERS8TFT4Gb6KX5KdmiBGEQfpBOKQYI+JzjB8Qum4SfgeCRlTq6REYYzlgW4 bKjZEiJUmr+rwLqRvdiLSm0pNeTSbAdHdZ14NLNqHHM0LCTrnJyLw0WEeJGBPfQUhrtM /qZ/Fucjl/BNBLaZGPUxkhR+owut5D+mZ8eOy2WLO+P2L4/sssdLFZcGB5+gKmAozdkU 9CWNODmOL26LLWYx8HiCp3Npeei3L8puQzYSI07BUC56fQakCw+XEcUakg6abDUk9D89 xrgoXqerSkeg22bf105HqGQC2uXETUnxvAyzL8CW6K7+a5ruhXmpCieKHng1ab4rXDCc HqtA== 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=VGVnZqDZJmo0g4SqAnUhbbL2Xw1cSFPmCshRh9thmWY=; b=RBtRC89hVMQDEFhbr9HXLv4qnMFszJJXU9Cj0LSJTEI3e/DRxUNnkxx6p7/oV86CIW 85Pa5GCrzZ29UMDolWHuNYQaF4ZPC/4bpY/G+fOR65mj/hUSrqhhd/o0w0d+Ijf9oiHa YVL8bdErjXhh0Z81fLuIWTR5dTrxeNcW8E3QXHu5Xd66oRKfIsiq72aYlAXcj6bGbaiV VG65GcWE56whcwxsiKqc3C+YMm6kLFR/rrQXKjVN0yPY3z6L9d0yGXCE8NYktNWyg26A hLV5jM4C4LdacJ3n2qi38jUu8q2JQJYNfNqoAb/TACf8Hwbx0gjHu2Zgwd/5d0PaQwFc n7Ow== X-Gm-Message-State: APjAAAWSp3bpTl8O3p1CtiA2UhCteaJbkPOpRKNpMXmwMUC+sf8vBZsT uNobx0lcr/r6vOP3HGFMHkpOvMx6 X-Google-Smtp-Source: APXvYqyB7rHmJopnRBdXxOr8M6hzNCI8utReV2LhkVZgEfur8JFiY2UIUclGuoAG7jJ9xKb/3AESlA== X-Received: by 2002:a5d:480b:: with SMTP id l11mr11218279wrq.129.1576781580326; Thu, 19 Dec 2019 10:53:00 -0800 (PST) Received: from ernst.home (p5B3BE980.dip0.t-ipconnect.de. [91.59.233.128]) by smtp.gmail.com with ESMTPSA id m7sm7198717wrr.40.2019.12.19.10.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 10:52:59 -0800 (PST) Date: Thu, 19 Dec 2019 19:52:58 +0100 From: Gary Jennejohn To: Gleb Popov Cc: freebsd-hackers Subject: Re: How to use locale(1) to set default paper size? Message-ID: <20191219195258.410ce33d@ernst.home> In-Reply-To: References: <20191219150438.3c4cdd94@ernst.home> 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: 47f1Gk1sbMz40db 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:02 -0000 On Thu, 19 Dec 2019 18:20:43 +0400 Gleb Popov wrote: > On Thu, Dec 19, 2019 at 6:04 PM Gary Jennejohn wrote: > > > On Thu, 19 Dec 2019 15:07:22 +0400 > > Gleb Popov wrote: > > > > > 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? > > > > > > > Click on Format->Page and a window will pop up. Open the Page tab > > and you can set the size to A4. > > > > LibreOffice should save that it when you click on OK. > > > > This sets it for current file only. If I close Writer, open it and then > create a new document, it gets back to "Letter". > > > > My size was set automatically to A4 because I already had a config > > file from 2008 laying around in my home directory with that setting. > > > > IIRC, LibreOffice config is a XML file. Can you find relevant tag and share > it with me, please? > I can't find any xml files anywhere, including under /usr/local, which contain A4 (or a4) or combinations with PAGE/page at all. I played around a little, changing the page size, and noticed that ~/.config/libreoffice/4/user/pack/config/standard.pack changed. But this is a Git pack according to /usr/bin/file and I have no idea how to read its contents. But I suspect that libreoffice does not use a global page size but wants to set it for each document. I say that because, when I went from A4 to Letter, libreoffice considered that the document had been changed and wanted me to save it, even though it was just a blank page. I have no idea why libreoffice starts with A4 pages for me. -- Gary Jennejohn