Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to automoate some PPT -> PDF conversions, so I want to run openoffice in headless mode for scripting.

On my machine with X running I can start opemoffice in headless mode via

soffice -accept="socket,port=8100;urp;" -headless

This doesn't seem to work on a server with X not running.

$ soffice -accept="socket,port=8100;urp;" -headless
/usr/lib/openoffice/program/soffice.bin X11 error: Can't open display: 
   Set DISPLAY environment variable, use -display option
  or check permissions of your X-Server
  (See "man X" resp. "man xhost" for details)
$ 

The error doesnt seem to make sense as well, as the point of specifying -headless was so that I do not need X, while this command seems to look for X.

share|improve this question

3 Answers 3

up vote 0 down vote accepted

You may be interested in unoconv.

share|improve this answer
    
That still requires a OpenOffice running in headless mode, which I am unable to do. –  uswaretech Mar 18 '10 at 9:36
    
Well yes but unoconv takes care of it.. Or do you mean you tried it out and got the same error? –  Joril Mar 18 '10 at 10:02

First type:

xhost +

Then type:

echo DISPLAY
setenv DISPLAY <hostname of your machine>:0.0

Then execute OpenOffice in headless mode.

share|improve this answer

If OOo hasn't been run on that server before you'll need to bypass the registration wizard. Looks like the option to do that is -nofirststartwizard; however there may be other complications as mentioned here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.