Group: OpenOfficeExtensions/Instructions

From LibrePlanet
Jump to: navigation, search

Beta instructions for using the free repository

NOTE: These are draft instructions -- bug reports and suggestions for better ways to make the switch are welcome.

The setting for the extension repository URL is in the registry. To use our replacement, open a file in your favorite text editor (like emacs, vim, or gedit) called:


and paste these lines:

   <?xml version="1.0" encoding="UTF-8"?>
   <oor:component-data xmlns:oor=""
   xmlns:install="" xmlns:xs=""
   xmlns:xsi="" oor:name="ExtensionManager" oor:package="org.openoffice.Office">
     <node oor:name="ExtensionRepositories">
       <prop oor:name="WebsiteLink">

If you have running, you'll need to restart it before the change will take effect.

Now when you go to Tools => Extension Manager => Get more extensions online, you should be taken to the FSF listing.

On Microsoft Windows, the file should be:

   ...\ 3\user\registry\data\org\openoffice\Office\ExtensionManager.xcu

To access the file on Mac OS X, right-click (or control-click) on the application, select "Show Package Contents", and navigate to:


Information on dpkg-divert

This is an easy way to replace a file in any package without making it fail on the next update. Dpkg-divert allows several packages to provide the same file -and the original provider package doesn't need to know-.

You can use dpkg-divert standalone, simply running it to rename any file in the system will create an entry in a list that will be checked every time a package wants to unpack that file. dpkg-divert will force the file to be unpacked on the renamed path instead. It doesn't matter if the file exists when you run dpkg-divert, you can create the diversion just in case a package wants to write your file in the future.

You can check the list of current diversions in the system at /var/lib/dpkg/diversions.

dpkg-divert is most often run from deb scripts to automate the process. To do so, you create a deb package including a file already provided by some other, and a preinst and postrm scripts to manage dpkg-divert.

Here goes an example, to replace the ExtensionManager.xcu file using a package named ooo-hacks:

In debian/preinst:

   file =
     [-f "$file" ".ubuntu"]
     || dpkg - divert-- package ooo -
     hacks-- add-- rename-- divert "$file" ".ubuntu" "$file"

In debian/postrm:

   file =
     if[remove = "$1" - o abort - install = "$1" - o disappear =
        "$1" - o abort - upgrade = "$1"]
     then[-f "$file" ".ubuntu"]
       && dpkg - divert-- package ooo -
       hacks-- remove-- rename-- divert "$file" ".ubuntu" "$file"

This method can be used to customize a package without compiling it, which in some cases can provide better freedom. For that to work the priority of the package needs to be "required", so it cannot be uninstalled without manually forcing it, and it can't be used to replace non-free binaries, because it will not stop the offending file from being distributed.

And be aware that this method can only replace files that are put in place by unpacking. If they are created by a script or during runtime (like most of /var and a lot in /etc) it will fail.