From 001673cdb48c1bb53dca4a90b7fd82892eb1861b Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Thu, 8 Mar 2018 14:29:24 -0600 Subject: [PATCH] Ejecutar LibreOffice como otra instancia --- source/app/controllers/util.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/app/controllers/util.py b/source/app/controllers/util.py index 2a32b14..8f39dbc 100644 --- a/source/app/controllers/util.py +++ b/source/app/controllers/util.py @@ -607,6 +607,10 @@ class LIBO(object): PORT = '8100' ARG = 'socket,host={},port={};urp;StarOffice.ComponentContext'.format( HOST, PORT) + CMD = ['soffice', + '-env:SingleAppInstance=false', + '-env:UserInstallation=file:///tmp/LIBO_Process8100', + '--headless', '--norestore', '--nologo', '--accept={}'.format(ARG)] def __init__(self): self._app = None @@ -647,15 +651,12 @@ class LIBO(object): if self.is_running: return - c = 1 - while c < 4: - c += 1 - self.app = subprocess.Popen([ - 'soffice', '--headless', '--accept={}'.format(self.ARG)], + for i in range(3): + self.app = subprocess.Popen(self.CMD, stdout=subprocess.PIPE, stderr=subprocess.PIPE) time.sleep(5) if self.is_running: - return + break return def _set_properties(self, properties):