setting LibreOffice settings automatically

Petr Mladek pmladek at
Mon Aug 13 04:44:52 PDT 2012

Hi Danishka,

Danishka Navin píše v Po 13. 08. 2012 v 12:46 +0530:
> To enable Sinhala spell checker I have to do few configurations in
> LibreOffice.
> It won't work by default.
> Is there a way to set some values for LibreOffice by editing a config
> file on GNU/Linux?
> For example, how to enable 
> tools-> options -> languages -> enable for  Asian and CTL

IMHO, the best way to modify user setting for more installations is to
create an extension.

You might take inspiration in the attached sample extension. It
modifies the application background color.

.oxt is actually a zip archive, so you could simply look inside. The
important part is setting.xcu. I created it the following way:

	1. format and safe current user registry modifications

            cd ~/.config/libreoffice/3/user
            xmllint -format registrymodifications.xcu

	2. start LO, modify configuration as needed and close LO

	3. format updated configuration

	    xmllint -format registrymodifications.xcu

	4. compare the configurations

	    diff -up registrymodifications.xcu.old

	5. take the new configuration and remove the parts
           that were not modified (as found in the .diff file).
           Note that you need to end with valid xml file, so you need to
           keep the header and the right context

             cp setting.xcu
             $EDITOR setting.xcu

Best Regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: company-setting.oxt
Type: application/vnd.openofficeorg.extension
Size: 1698 bytes
Desc: not available
URL: <>

More information about the LibreOffice mailing list