wiki:FactoryManual/StandardFactory/OOOServer

Version 2 (modified by sander, 8 years ago) (diff)

--

OOOServer backend

<< Previous: Running the standard factory | Next: CLI backend >>?

The OOOServer backends implements OpenOffice.org running in headless mode. As such it is not able to produce screenshots but only ODF roundtrip and PDF export. To use the OOOServer backend you must have OpenOffice.org running in headless mode. See Running OpenOffice.org in headless mode.

Besides the standard configuration options, you can set the following options for the OOOServer backend.

ooo_host
The hostname of the machine that OpenOffice.org is running on in headless mode. Normally this should be localhost. If you set this option then you should also set the ooo_port option.
ooo_port
The port number that OpenOffice.org is listening to. This should normally be 8100.
ooo_pipe
The name of the pipe that OpenOffice.org is listening to. If you set this option then you should not set the ooo_host and ooo_port options.

On Windows XP and Vista it is not possible to connect to OpenOffice.org using a socket with the ooo_host and ooo_port options. You should use a pipe instead.

Running OpenOffice.org in headless mode

When OpenOffice.org is running in headless mode you cannot start it yourself anymore. The easiest thing to do is to create a new user on your computer and run OpenOffice.org in headless mode under that user account instead of your own. Linux users can start OpenOffice.org in headless mode using the following command:

$> soffice -headless -nologo -norestore -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager

For Windows users there is a simple batch file in the utils directory called utils/oooserver.bat. Simply edit that file, make sure that the OOOPATH is correct and that the OOOPIPE is the same as the pipe name in your configuration file. Then double-click the file to start OpenOffice.org in headless mode. If you want to start OpenOffice.org manually on Windows then you can execute the following command:

$> soffice.exe -headless -nologo -norestore "-accept=pipe,name=officeshots;urp;StarOffice.ServiceManager"

Sometimes OpenOffice.org on Windows does not install the Python UNO bridge. You can re-install OpenOffice.org. Make sure you choose Custom install amd check the box that installs Python UNO.

The oooserver init script in the utils directory can be used to automatically start and stop OpenOffice.org in headless mode on a Debian or Ubuntu machine. It uses xvbf, the X Virtual FrameBuffer so it can even run on a machine that has no complete X Server installed such as most servers. Place this file in your /etc/init.d directory and make it executable. Then you need to add symlinks to it in the appropriate places. You can execute the following command (as root) to create these symlinks automatically:

#> update-rc.d oooserver defaults

You will also need to configure the oooserver init script. By default oooserver will run as user nobody but on many systems this user does not have a valid home directory. OpenOffice.org does not start without a valid home directory. Either make sure user nobody exists and has a valid home directory, or change the USER parameter in the oooserver init script.

<< Previous: Running the standard factory | Next: CLI backend >>?