Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

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

First type:

xhost +

Then type:

setenv DISPLAY <hostname of your machine>:0.0

Then execute OpenOffice in headless mode.

share|improve this answer
Just a note: you might want to execute echo $DISPLAY with the dollar sign. – Maistora Mar 20 '15 at 13:21

Your Answer


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.