How to use locale(1) to set default paper size?
Gary Jennejohn
gljennjohn at gmail.com
Thu Dec 19 19:09:15 UTC 2019
On Thu, 19 Dec 2019 19:53:07 +0100
Miroslav Lachman <000.fbsd at 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
More information about the freebsd-hackers
mailing list