My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
OpenOfficeConverter  
OpenOffice Converter Installation instructions
Phase-Documentation, Installation
Updated Aug 28, 2011 by seba.wag...@gmail.com

Starting OO in headless with Version OpenOffice 3.0 ++

Starting with OO 3.0 you do not need Xvfb anymore you can just use this:

  • for Linux: /path/to/openoffice/program/soffice.bin -headless -nofirststartwizard -accept="socket,host=localhost,port=8100;urp;StarOffice.Service"
  • for Mac OS X: /path/to/openoffice.app/Contents/!MacOS/soffice.bin -headless -nofirststartwizard -accept="socket,host=localhost,port=8100;urp;StarOffice.Service"
  • for Windows: soffice.exe -headless -nofirststartwizard -accept="socket,host=localhost,port=8100;urp;StarOffice.Service"

Linux (Debian,Ubuntu)

Open Office 2.4 Debian, Ubuntu

There are some improvements related to Openoffice 2.4 version. If you have to run old versions of Openoffice for any reason, please find the old section below. With 2.4, no more xvfb framebuffer needed.

Installation steps (based on Etch 4.0 i386)

  1. Set backports for packages
  • Check your Debian version, find suitable backport source
  • vi(or nano or pico or your very favorite editor) /etc/apt/sources.list
  • add this line
  • deb http://www.backports.org/debian etch-backports main contrib non-free
  • run apt-get update
  1. Install packages
  • Be sure all packages tagged with 2.4.0-4~bpo40+1
  • openoffice.org-headless,
  • openoffice.org-base, openoffice.org-writer, openoffice.org-calc, openoffice.org-impress, openoffice.org-draw, openoffice.org-math, openoffice.org-filter-mobiledev, openoffice.org-filter-binfilter, msttcorefonts, pstoedit, libpaper-utils, ttf-dejavu
  1. Write startup script for test
  • vi ooo.sh

unset DISPLAY
/usr/lib/openoffice/program/soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless -nofirststartwizard
  • chmod +x ooo.sh
  1. Run the oOo server as root.
  • sh ooo.sh
  • Check if server started with netstat -an | grep 8100
  • Should seem like tcp 0 0 127.0.0.1:8100 0.0.0.0:* LISTEN
  • Check you have soffice process running ps aux | grep soffice
  1. Test the conversion from command line
  • cd /usr/lib/red5/webapps/openmeetings/jod/
  • cp /home/userx/testme.ppt . (figure out the copy ppt file to your server, winscp?)
  • java -jar jodconverter-cli-2.2.0.jar -f pdf testme.ppt
  • The result normally should be like below
  • com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect
    INFO: connected
    com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection disposing
    INFO: disconnected
  1. Login to openmeetings and check the conversion from there too.

Check List, Pay ATTENTION to this List!!!

  • run ooo.sh as root otherwise converted document cant be written.
  • Dont mess with directory permissions of upload, uploadtemp and jod. DO NOT left any file world writable on your behind.
  • If your app name is other then "openmeetings" you should find

webapp/src/app/org/openmeetings/app/remote/Application.java line 66 and change to your context (will be fixed in svn)

  • check webapps/openmeetings/jod/ dir. You'll see
    • BATCHTHUMB_date_time_stamp_thumbnail.sh
    • PDFCONVERT_date_time_stamp_jodconverter.sh
    • SWFCONVERT_date_time_stamp_swfconverter.sh
    • THUMB_date_time_stamp_thumbnail.sh
  • Those files created on the fly. Do not attempt to play with jodconverter2.sh
  • Check command line error codes;
    • com.sun.star.task.ErrorCodeIOException; Be sure all packages installed, check ooo.sh run by root.
    • com.sun.star.lang.IllegalArgumentException: URL seems to be an unsupported one; Be sure all packages installed.
  • Always watch openmeetings.log to see what really goes on. tail -f /usr/lib/red5/openmeetings.log from your console.

Todo List

  • Create Debian init script for safe oOo operation
  • Understand this, why numbered list and bullet item couldnt be used together and always you have repeated number one in wiki :)

Install Open Office Service on Debian/(K)Ubuntu (versions > 2.3)

  1. Install OpenOffice-Headless as root (through su, sudo, etc.):
  2. sudo apt-get install openoffice.org-headless
  3. Create and edit a file named openoffice.sh (for example) with you favorite editor over /etc/init.d:
  4. vi /etc/init.d/openoffice.sh
    #!/bin/bash
    # openoffice.org  headless server script
    #
    # chkconfig: 2345 80 30
    # description: headless openoffice server script
    # processname: openoffice
    # 
    # Author: Vic Vijayakumar
    # Modified by Federico Ch. Tomasczik
    #
    OOo_HOME=/usr/bin
    SOFFICE_PATH=$OOo_HOME/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_PATH -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
  5. Change the permssions to this file:
  6. chmod 0755 /etc/init.d/openoffice.sh
  7. Install openoffice.sh init script links:
  8. update-rc.d openoffice.sh defaults
  9. Start the service:
  10. /etc/init.d/./openoffice.sh start
  11. You can see if openofice is running with this command:
  12. netstat -nap | grep office

You should get something like this:

tcp        0      0 127.0.0.1:8100          0.0.0.0:*
LISTEN     2467/soffice.bin 
  • Service openoffice start automatically when you restart the next time your server.

Note: This script is based on Vic Vijayakumar's script at http://little.bluethings.net/2008/05/30/automating-document-conversion-in-linux-using-jodconverterooo/

Install Open Office Service on Debian/(K)Ubuntu Old Versions prior to 2.3

  1. Install OpenOffice
  2. sudo apt-get install xvfb openoffice.org
  3. Edit /usr/lib/openoffice/share/registry/data/org/openoffice/Setup.xcu
  4. After <node oor:name="Office"> insert the following lines:
  5. <prop oor:name="ooSetupConnectionURL" oor:type="xs:string">
       <value>socket,host=localhost,port=8100;urp</value>
    </prop>
  6. Launch :
  7. xvfb-run --server-args='-screen 0 800x600x16' -a /usr/lib/openoffice/program/soffice -headless -nologo -norestore

NOTE: Since OpenOffice 2.3 comes already with an build-in FrameBuffer there is no need for xvfb anymore.

Mac OSx

Install Open-Office from the Open-Office webside Normally it is installed into your Application folder. Goto file: /Applications/OpenOffice.org\ 2.0.app/Contents/MacOS/share/registry/data/org/openoffice/Setup.xpu

add the following after the node <node oor:name="Office"> :

                <prop oor:name="ooSetupConnectionURL">                                                                                                                               
                        <value>                                                                                                                                                      
                            socket,host=localhost,port=8100;urp;StarOffice.ServiceManager                                                                                            
                        </value>                                                                                                                                                     
                </prop>  

start x11/x-server (you can just start openoffice the normal way, close the openoffice app again but do NOT close the x-server/x-terminal, it will open a display for x11 on display :0)

open a new terminal and type:

sudo /Applications/OpenOffice.org\ 2.0.app/Contents/MacOS/program/soffice -display :0 -headless -nologo -norestore

OR

/Applications/OpenOffice.org\ 2.0.app/Contents/MacOS/program/soffice -display :0 -headless -nologo -norestore

sudo depends of your Red5 service .. if red5 is started as sudo (which must be started as sudo if the server is listening on port 80 (or smaller 1200) then ooservice also has to run as sudo cause it writes/reads from directories which red5 creates.

Windows

  • Install Open Office
  • Launch it one time (so that you have filled the registrering form of Open Office which does only popup one time)
  • Open a Command-Prompt (CMD) and goto your Open Office Executable directory (for example C:\Programme\OpenOffice.org 2.0\program)
  • Run Open Office in headless Modus with this command:
soffice.exe -headless -nologo -norestore -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager
  • check if its running by typing: netstat -anp tcp
you should find a line:
TCP 127.0.0.1:8100 0.0.0.0:0 LISTENING

For more info see: http://www.artofsolving.com/node/11

Links

Comment by Pascal.J...@gmail.com, Apr 14, 2008

On Debian the headless option (framebuffer buid-in implementation) require an additional package : openoffice.org-headless . Next to launch OOo converter, just type : soffice -headless -nologo -norestore -accept="socket,host=localhost,port=8100;urp"

Comment by project member kunt...@gmail.com, Jun 1, 2008

Debian etch users; openoffice.org-headless AND openoffice.org-java-common needed otherwise javaldx: Could not find a Java Runtime Environment! error occurs. do not forget to remove /userxxx/.openoffice2/ dir if you tried something.

Comment by Jai.edva...@gmail.com, Jun 1, 2008

I am on Centos 5, I have installed openoffice but xvfb-run is not available.

Comment by project member kunt...@gmail.com, Jun 1, 2008

Openoffice 2.4 headless no more needs xvfb to run. Check the version of openoffice.

Comment by Jai.edva...@gmail.com, Jun 2, 2008

I have edited /opt/openoffice.org2.4/share/registry/data/org/openoffice/Setup.xcu

Now when I start /opt/openoffice.org2.4/program/soffice -headless -nologo -norestore &

and then try to see port using lsof -w -n -i tcp:8100 I get nothing.

Comment by yyov...@gmail.com, Jun 12, 2008

Hi Jai.edvanta, \\

You have to install this package "openoffice.org-headless-2.4.1-9310.i586.rpm"

Comment by reza.isk...@gmail.com, Jun 27, 2008

after adding "deb http://www.backports.org/debian etch-backports main contrib non-free" at apt source.list. I get errors when run "apt-get update" W: GPG error: http://www.backports.org etch-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EA8E8B2116BA136C W: You may want to run apt-get update to correct these problems

Comment by sascha.x...@gmail.com, Sep 24, 2008

Hi Jai.edvanta, a bit late, but i think you must add -nofirststartwizard to the startline like mentioned above in the init-script example. otherwise soffice won't even start headless as far as i tested...

Comment by ykano...@gmail.com, Feb 4, 2009

On the Mac, there seems to be 2 Setup.xcu files: /Applications/OpenOffice?.org.app/Contents/basis-link/share/registry/data/org/openoffice/Setup.xcu /Applications/OpenOffice?.org.app/Contents/basis-link/share/registry/res/en-US/org/openoffice/Setup.xcu

I am using Open Office 3.0.1 and not 2.0 in the setup listed.

Also the location of soffice has changed: /Applications/OpenOffice?.org.app/Contents/MacOS/soffice

Comment by gva...@gmail.com, Feb 24, 2009

Does anyone know of a good combination of openoffice with headless package for Centos? I've installed openoffice.org3.0.1 on the server (using RPM package) but can't find a headless i586 package for it anywhere.

Getting headless to work on Centos seems to be a nightmare ...

Comment by akm...@gmail.com, Apr 29, 2009

Hi, I am trying to install openoffice.org-headless, but get "Broken packages":

~# apt-get install openoffice.org-headless Reading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation:

The following packages have unmet dependencies:

openoffice.org-headless: Depends: openoffice.org-core (= 1:2.4.1-12~bpo40+1) but 2.0.4.dfsg.2-7etch6 is to be installed
E: Broken packages

Comment by myleso...@gmail.com, Jun 28, 2009

On a CentOS 5 system, when i type:

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

I get ...

/usr/lib/openoffice.org/program/soffice.bin: /usr/local/lib/libpng12.so.0: no version information available (required by /usr/lib/libcairo.so.2)

Any ideas anyone?

Comment by gzw...@gmail.com, Mar 4, 2010
Hi, akmzia, you can install openoffice3.x by yourself, download the .zip file first, and then unpack it, install it by use dpkg
Comment by tarh...@gmail.com, Apr 5, 2011

where can i download it ??

Comment by sukrant2...@gmail.com, May 27, 2011

I tried many things to install openmeetings on RHEL5 or centos5 , Is there anyone who really Done it .. Please suggest me few configuration steps.. ya Please don't just try to increase one more useless post..

Comment by conrad.b...@gmail.com, Dec 22, 2011

On Ubuntu (Oneric Ocelot), I had to install the package openoffice.org besides the headless version. Otherwise a strange string of error messages appears. The server must be up and running though.

Conrad

Powered by Google Project Hosting