Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2019 20:09:10 +0100
From:      Gary Jennejohn <gljennjohn@gmail.com>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        Gleb Popov <arrowd@freebsd.org>, freebsd-hackers <freebsd-hackers@freebsd.org>
Subject:   Re: How to use locale(1) to set default paper size?
Message-ID:  <20191219200910.07007545@ernst.home>
In-Reply-To: <f1c44cbc-ada9-3cde-a435-7d99935f7862@quip.cz>
References:  <CALH631kMMK3boE5nndyEnM-_u7nw7%2B05KMiQiEMvcP-0OD9g7w@mail.gmail.com> <f1c44cbc-ada9-3cde-a435-7d99935f7862@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191219200910.07007545>