Docs won't open while soffice running as service
Posted: Thu Feb 01, 2018 6:50 pm
I've written custom reporting software that runs as a Windows service. My windows service connects to OpenOffice through the CLI.
If I have a Writer document open on my desktop, the CLI call to the bootstrapper in the service always blocks. It basically locks up and doesn't recover.
To try to solve this I figured out how to launch soffice as a service with the following command. But when I run this service I can't open any documents.
Is there any way to configure this such that I can run my headless soffice service so it can interop with my windows service, and still be able to open and edit documents without any conflicts?
Interestingly it works as expected when that original call to boostrap() is not from the Windows service. When I test my code directly without starting as a service I can work with multiple documents and the service will still bootstrap and create documents as well, with no conflicts.
If I have a Writer document open on my desktop, the CLI call to the bootstrapper in the service always blocks. It basically locks up and doesn't recover.
Code: Select all
_context = uno.util.Bootstrap.bootstrap();
Code: Select all
start soffice -headless -accept=pipe,name=pipe_name;urp -noffirststartwizard
Interestingly it works as expected when that original call to boostrap() is not from the Windows service. When I test my code directly without starting as a service I can work with multiple documents and the service will still bootstrap and create documents as well, with no conflicts.