Running OpenOffice From Remote Machine

cancel
Showing results for 
Search instead for 
Did you mean: 

Running OpenOffice From Remote Machine

resplin
Intermediate
0 0 2,656

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



OpenOfficeInstallationThird-Party Libraries
Sometimes there is a need to run Alfresco and OpenOffice on separate machines.


Remote Machine Setup


On the remote machine create a script to launch OpenOffice that contains


'<Path to soffice>' '-accept=socket,host=<IP or DNS name>,port=<listening on>;urp;StarOffice.ServiceManager' -nologo -headless -nocrashreport -nofirststartwizard -nologo -norestore &

This will start an instance of OpenOffice running on the machine.  If this machine is running headless, follow the instructions here to configure the virtual framebuffer.

Example:


'/usr/bin/soffice' '-accept=socket,host=156.124.12.101,port=8100;urp;StarOffice.ServiceManager' -nologo -headless -nocrashreport -nofirststartwizard -nologo -norestore &

You can use an init script like this as well.
If you have a firewall enabled on this machine, make sure your firewall is open for the port specified.


Alfresco Configuration


From 3.4.11 and 4.1.1


Set the following alfresco global properties:



ooo.host=<OpenOffice host ip address>
ooo.port=<OpenOffice port number>
ooo.enabled=true

ooo.host is set to localhost by default so needs to be overridden.


Sub-system approach


Following the movement of OpenOffice transformations into a sub-system, the original configuration offered by this page did not work ([See this ticket in Jira]). However the basic approach of overriding spring beans still held. Instead of overriding beans in the general application context, beans in the OOoDirect subsystem context needed to be overridden.


Original approach


On the Alfresco side, you need to create a remote-openoffce-context.xml file in the extensions directory (ex. tomcat/shared/classes/alfresco/extension)

In this file place:


<beans>

        <bean id='openOfficeConnection' class='net.sf.jooreports.openoffice.connection.SocketOpenOfficeConnection'>
                <constructor-arg type='java.lang.String' value='156.124.12.101'/>
                <constructor-arg type='int' value='8100'/>
        </bean>

        <bean id='transformer.OpenOffice' class='org.alfresco.extension.repo.content.transform.RemoteOpenOfficeContentTransformer' parent='baseContentTransformer' >
<property name='connection'>
  <ref bean='openOfficeConnection' />
</property>
<property name='documentFormatsConfiguration'>
  <value>classpath:alfresco/mimetype/openoffice-document-formats.xml</value>
</property>
</bean>

</beans>

Set the values of the constructor arguments equal to the IP or DNS name and port of the machine running OpenOffice.

Next, you need to install the remoteOpenOffice-0.1.amp file.  Use the Alfresco Module Management Tool (alfresco-mmt) to install the amp file.

NOTE: From 2.2 SP1 onwards the RemoteOpenOfficeContentTransformer class will be available ready packaged out of the box. The configuration file mentioned above will be available as a sample extension.