Launching openoffice / libreoffice headless on FreeBSD

Hello,

    Does anyone have any idea how to launch open/libreoffice on startup on Freebsd?

If I am logged in, and I run the following from the command line, then I can view docs on openvpms, presumably using openoffice headless:

 

#/usr/local/openoffice.org-3.4.1/openoffice.org3/program/soffice.bin
-headless -nofirststartwizard
-accept="socket,host=localhost,port=8100;urp;StarOffice.Service"

On BSD, startup scripts are stored under /usr/local/etc/rc.d.

So I create a script using the above lines and store it there under the name "openoffice".  I then go to /etc/rc.conf and add openoffice_enable="YES"

When I reboot, I get the error on startup "-headless ... not found".  I am not sure why BSD cannot launch the headless mode on boot, but can when I am logged into a terminal. 

Any help appreciated, as this is driving me nuts.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Launching openoffice / libreoffice headless on FreeBSD - SOL

OK, for a soultion to this, please see my post on the FreeBSD forums:

 

http://forums.freebsd.org/showthread.php?t=36383

Re: Launching openoffice / libreoffice headless on FreeBSD

Just be aware that if you start OpenOffice outside of OpenVPMS, you need to prevent OpenVPMS from restarting it periodically. This is done as OpenOffice is known to leak memory (at least 2.x), so frequent restarts free the memory up.

This is done by editing the applicationContext.xml file located in <TOMCAT_HOME>/webapps/openvpms/WEB-INF

     <!-- OpenOffice connection pool. Uses an OOBootstrapService
         to create connections.
    -->
    <bean id="OOBootstrapConnectionPool"
          class="org.openvpms.report.openoffice.OOBootstrapConnectionPool">
        <constructor-arg ref="OOSocketBootstrapService"/>
        <!-- restart OpenOffice after 'reuseCount' uses. Use 0 to never
             restart.
        -->
        <property name="reuseCount" value="1000"/>
    </bean> 

In the above, change the reuseCount as follows.

<property name="reuseCount" value="0"/>

-Tim

Re: Launching openoffice / libreoffice headless on FreeBSD

Thanks for the tip, Tim.

 

I assume that there must be a way for openvpms to start openoffice when it needs a document, then stop it.  But I have not found a way to do that in BSD.

Syndicate content