How do I export customized Libreoffice config files?

Solution 1:

Looks like I found the answer to my own question once again. According to this post over at Ask Libreoffice, the config file ~/.config/libreoffice/*/user/registrymodifications.xcu is the one to look at. It's a huge XML file, which could make it a bit tricky to modify via command line, but if you just create your own registrymodifications.xcu right after you install LibreOffice, you can just add your custom options first in an almost empty file as a template, and LibreOffice will append what's missing when you start it.

Remember to start your file with

<?xml version="1.0" encoding="UTF-8"?>
<oor:items xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

And end it with

</oor:items>

Anyway, the XML nodes that I wanted to change are these:

Turn autosave on/off

<item oor:path="/org.openoffice.Office.Common/Save/Document">
  <prop oor:name="AutoSave" oor:op="fuse">
    <value>false</value>
  </prop>
</item>
(...)
<item oor:path="/org.openoffice.Office.Recovery/AutoSave">
  <prop oor:name="Enabled" oor:op="fuse">
    <value>false</value>
  </prop>
</item>

Change the <value>false</value> to <value>true</value> in both places to enable.

Set autosave interval. Default is 15 minutes.

<item oor:path="/org.openoffice.Office.Common/Save/Document">
  <prop oor:name="AutoSaveTimeIntervall" oor:op="fuse">
    <value>15</value>
  </prop>
</item>
(...)
<item oor:path="/org.openoffice.Office.Recovery/AutoSave">
  <prop oor:name="TimeIntervall" oor:op="fuse">
    <value>15</value>
  </prop>
</item>

Change the <value>15</value> to <value>YourInterval</value> both places.

Change default text color to BLACK instead of DARK GREY

<item oor:path="/org.openoffice.Office.UI/ColorScheme/ColorSchemes/org.openoffice.Office.UI:ColorScheme['LibreOffice']/FontColor">
  <prop oor:name="Color" oor:op="fuse">
    <value xsi:nil="true"/>
  </prop>
</item>

Change the <value xsi:nil="true"/> to <value>0</value>.

Turn off auto suggested words (annoying feature, IMO)

<item oor:path="/org.openoffice.Office.Writer/AutoFunction/Completion">
  <prop oor:name="Enable" oor:op="fuse">
    <value>true</value>
  </prop>
</item>

Change the <value>true</value> to <value>false</value> to disable.

Change autosave path to $CONFIGDIR/tmp instead of /tmp

/tmp gets purged at reboot, so if your computer crashes or the power goes out, you're not in luck by using the default settings in LO.

<item oor:path="/org.openoffice.Office.Paths/Paths/org.openoffice.Office.Paths:NamedPath['Temp']">
    <prop oor:name="WritePath" oor:op="fuse">
        <value>$(user)/tmp/</value>
    </prop>
</item>

LibreOffice/OpenOffice creates the directory for you if it doesn't exist. There's already a $(user)/temp folder, but no one seems to know what it's for. To be sure, I created a new one just called tmp.

Solution 2:

Found this: http://wiki.documentfoundation.org/UserProfile

But it does not answer all the questions you have raised ..