How to use locale(1) to set default paper size?

Miroslav Lachman 000.fbsd at quip.cz
Thu Dec 19 18:53:10 UTC 2019


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


More information about the freebsd-hackers mailing list