Disable automatic update check globally via XML file

Hi,

I am configuring LibreOffice on many computers, and I am using XML files to do that. I can’t find a way to disable automatic update check. After reading the wiki, I have already been able to change the default icon set, because it is quite similar to the example:

<?xml version="1.0" encoding="UTF-8"?>
<oor:data xmlns:oor="http://openoffice.org/2001/registry">
  <dependency file="main"/>
  <oor:component-data oor:package="org.openoffice.Office" oor:name="Common">
    <node oor:name="Misc">
      <prop oor:name="SymbolStyle">
        <value>colibre</value>
      </prop>
    </node>
</oor:data>

But I don’t understand how I could translate the following screenshot (from advanced preferences) to the corresponding XML (I suppose I only need to set AutoCheckEnable to false):
image description

Any suggestion?

Regards,
Yvan

Maybe checking file onlineupdate.xcd in <INST_PATH_OF_LIBREOFFICE>/share/registry could help.

Good idea, but unfortunately I have tried many variant of the following XML file without success: LibreOffice immediately crashes on startup…

<?xml version="1.0" encoding="UTF-8"?>
<oor:data xmlns:oor="http://openoffice.org/2001/registry">
  <dependency file="main"/>
  <oor:component-data oor:package="org.openoffice.Office" oor:name="Jobs">
    <node oor:name="Jobs">
      <node oor:name="UpdateCheck">
        <prop oor:name="Service">
          <value>com.sun.star.setup.UpdateCheck</value>
        </prop>
        <node oor:name="Arguments">
          <prop oor:name="AutoCheckEnabled">
            <value>false</value>
          </prop>
        </node>
      </node>
    </node>
  </oor:component-data>   
</oor:data>

Put this into <inst_path_of_libreoffice>/share/registry/onlineupdateDisabled.xcd, as noted by @anon73440385:

<?xml version="1.0"?>
<oor:data xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oor="http://openoffice.org/2001/registry">
    <dependency file="main"/>
    <oor:component-data xmlns:install="http://openoffice.org/2004/installation" oor:name="Jobs" oor:package="org.openoffice.Office">
        <node oor:name="Jobs">
            <node oor:name="UpdateCheck" oor:op="fuse">
                <node oor:name="Arguments">
                    <prop oor:name="AutoCheckEnabled" oor:type="xs:boolean" oor:op="replace" oor:finalized="true">
                        <value>false</value>
                    </prop>
                </node>
            </node>
        </node>
    </oor:component-data>
</oor:data>

Note this:

  1. Use of oor:op: in case of node oor:name="UpdateCheck" element, it’s oor:op="fuse", meaning that the node does not replace the existing definition of the whole node, but merges with it. In case of prop oor:name="AutoCheckEnabled" element, it’s oor:op="replace".
  2. Use of oor:finalized in case you need to disable the element modification by users.
  3. You could change the value directly in onlineupdate.xcd, but that’s not recommended, since that would potentially create problems with updating LO;
  4. I chose “onlineupdateDisabled.xcd” name deliberately, because it would follow “onlineupdate.xcd” alphabetically. I had learned elsewhere that the naming and resulting order is somehow important - but I haven’t got the time to investigate rules behind that and real impact, so no idea if that applies to this specific setting actually. Take it as an educated guess.
  5. Note that I only mentioned needed nodes, and e.g. not included prop oor:name="Service" element that appeared in your sample.

That is perfect! Thanks for the explanations, those should definitely be written in the wiki: would you like to add it? If not, I could try to do it.