How to use LibreOffice without X?

Hello,

I’m trying to use a test server to do a massive conversion of format (from .doc to .html).

So I installed LibreOffice and tried to do the conversion.

Unfortunately, it didn’t work:

root@panda-dev:~/bin $ soffice --headless --convert-to txt:text blah.doc
/usr/lib64/libreoffice/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)

Can’t we use LibreOffice in batch mode when X is not installed?

There is some ongoing work from a volunteer to provide a way to compile Libreoffice for headless use. But for this you would need to compile Libreoffice yourself.

See http://wiki.documentfoundation.org/Development/HeadlessBuild for some details but that does not mean that it can be used in a productive environment yet.

Thank you for you answer. I will try this as soon as I manage to compile LibreOffice on my system.