Difference between revisions of "OpenOffice.org"

From OpenKM Documentation
Jump to: navigation, search
 
Line 1: Line 1:
OpenKM can convert some document types to PDF. This is a great help if need to read an Microsoft Office / OpenOffice.org document and you don't have the software installed in the computer.
+
#REDIRECT [[Third-party software integration: OpenOffice.org]]
 
 
You need an OpenOffice.org installation in the OpenKM server, and also this OpenOffice.org application has to be running in server mode (also known as headless). In Debian / Ubuntu, depending of you OpenOffice.org version you will have to install an X11 virtual server or not:
 
 
 
$ apt-get install xvfb
 
 
 
And start it using this command:
 
 
 
$ xvfb-run /usr/lib/openoffice/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
 
 
 
From OpenOffice.org 2.3, it is not necessary the X11 virtual server but you should install these packages:
 
 
 
$ aptitude install openoffice.org-headless openoffice.org-java openoffice.org
 
 
 
But before of this, you must enable a couple of repositories:
 
 
 
<source lang="text">
 
deb http://en.archive.ubuntu.com/ubuntu/ hardy-updates universe
 
deb http://en.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
 
</source>
 
 
 
This script simplifies the start process (For security reasons, you should no start OpenOffice.org as root):
 
 
 
<source lang="bash">
 
#!/bin/sh
 
unset DISPLAY
 
/usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo
 
-headless -nofirststartwizard
 
</source>
 
 
 
OpenOffice.org will listen at port 8100, so you can check that the application has started running this:
 
 
 
$ netstat -putan | grep 8100
 
 
 
Also you can configure OpenOffice.org as a service with this script:
 
 
 
<source lang="bash">
 
#!/bin/bash
 
# openoffice.org headless server script
 
#
 
# chkconfig: 2345 80 30
 
# description: headless openoffice server script
 
# processname: openoffice
 
#
 
# Author: Vic Vijayakumar
 
# Modified by Paco Avila and Federico Ch. Tomasczik
 
#
 
SOFFICE=/usr/bin/soffice
 
PIDFILE=/var/run/openoffice-server.pid
 
set -e
 
case "$1" in
 
    start)
 
        if [ -f $PIDFILE ]; then
 
            echo "OpenOffice headless server has already started."
 
            sleep 5
 
            exit
 
        fi
 
        echo "Starting OpenOffice headless server"
 
        $SOFFICE -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
 
        touch $PIDFILE
 
        ;;
 
    stop)
 
        if [ -f $PIDFILE ]; then
 
            echo "Stopping OpenOffice headless server."
 
            killall -9 soffice && killall -9 soffice.bin
 
            rm -f $PIDFILE
 
            exit
 
        fi
 
        echo "Openoffice headless server is not running."
 
        exit
 
        ;;
 
    *)
 
        echo "Usage: $0 {start|stop}"
 
        exit 1
 
esac
 
exit 0
 
</source>
 
 
 
Change the permissions to this file:
 
 
 
$ chmod 0755 /etc/init.d/openoffice
 
 
 
Install openoffice init script links:
 
 
 
$ update-rc.d openoffice defaults
 
 
 
And this script will launch OpenOffice.org on every system reboot. Also you can launch it manually this way:
 
 
 
$ /etc/init.d/openoffice start
 
 
 
More info at:
 
* http://www.artofsolving.com/node/10
 
* http://www.oooforum.org/forum/viewtopic.phtml?t=11890
 
* http://code.google.com/p/openmeetings/wiki/OpenOfficeConverter
 
 
 
[[Category: Installation Guide]]
 

Latest revision as of 15:11, 26 January 2010