forked from elmau/empresa-libre
Ejecutar LibreOffice como otra instancia
This commit is contained in:
parent
e2da894d8b
commit
001673cdb4
|
@ -607,6 +607,10 @@ class LIBO(object):
|
||||||
PORT = '8100'
|
PORT = '8100'
|
||||||
ARG = 'socket,host={},port={};urp;StarOffice.ComponentContext'.format(
|
ARG = 'socket,host={},port={};urp;StarOffice.ComponentContext'.format(
|
||||||
HOST, PORT)
|
HOST, PORT)
|
||||||
|
CMD = ['soffice',
|
||||||
|
'-env:SingleAppInstance=false',
|
||||||
|
'-env:UserInstallation=file:///tmp/LIBO_Process8100',
|
||||||
|
'--headless', '--norestore', '--nologo', '--accept={}'.format(ARG)]
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._app = None
|
self._app = None
|
||||||
|
@ -647,15 +651,12 @@ class LIBO(object):
|
||||||
if self.is_running:
|
if self.is_running:
|
||||||
return
|
return
|
||||||
|
|
||||||
c = 1
|
for i in range(3):
|
||||||
while c < 4:
|
self.app = subprocess.Popen(self.CMD,
|
||||||
c += 1
|
|
||||||
self.app = subprocess.Popen([
|
|
||||||
'soffice', '--headless', '--accept={}'.format(self.ARG)],
|
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
if self.is_running:
|
if self.is_running:
|
||||||
return
|
break
|
||||||
return
|
return
|
||||||
|
|
||||||
def _set_properties(self, properties):
|
def _set_properties(self, properties):
|
||||||
|
|
Loading…
Reference in New Issue