Building libreoffice headless

Jan-Marek Glogowski glogow at fbihome.de
Thu Jun 13 04:24:24 UTC 2019


Hi James,

Am 12.06.19 um 16:00 schrieb James Carbine:
> We would really like to use either the --without-x or --disable-gui
> options to build a headless LibreOffice. As shown here:
> https://wiki.documentfoundation.org/Development/HeadlessBuild. I
> recognize that, the time of this posting, it says `WARNING: This is
> broken in master and 4.4! Unless you plan to fix it don't use it`. I
> attempted looking into fixing it. But the truth is, I don't have the
> knowledge to fix it. I know nothing about building LibreOffice.

That info might be completely out of date. It refers to 4.4, which is a few
years old. But then I never build without GUI. As you may know there is the
LibreOffice Online version since a few years[1]. That can run in a docker
container on a server. But I don't know if it really is build without any GUI
libraries at all. I never used it.

> Can any one either point me in the direction I need to go in order to
> build LibreOffice without X (or any gui dependencies)?
> 
> -or-
> 
> Are there any maintainers that the company I work for(Atomic Jolt) can
> pay to fix the headless build option?

Please have a look at [2].
> We want to make sure there are no gui dependencies.

It's not clear what that means for you. No gui libraries linked or no running
gui reqired.

On Linux, the X11 libs might be linked to our VCL library (LO's own toolkit),
but X11 is not required to run even normal LO as a server background process. It
runs just fine when started with the --headless parameter and the SVP VCL
backend via SAL_USE_VCLPLUGIN=svp on a headless server. With the proper --accept
parameter you can control it remotely via UNO. That's what the Java unit tests
do. Start an background LO instance and control it. Same for Python an even UI
tests.

I used to run LO builds and tests on a headless server in a Tinderbox (a LO
build bot). I even implemented headless for MacOS, so I could run the tests and
builds via SSH without any windows, just bitmaps. But that was ~1.5 years ago -
code might have bit-rotted since then.

But this still required GUI libraries linked, as it's just a command line
switch, which replaces the OS GUI parts for bitmaps, simplified.

HTH

Jan-Marek

[1] https://www.libreoffice.org/download/libreoffice-online/
[2] https://www.libreoffice.org/get-help/professional-support/
[3] https://wiki.documentfoundation.org/Development/Tinderbox


More information about the LibreOffice mailing list