Verificou se o Xvfb está escutando o socket?
Porque está usando o root?

Tenta aí (este scrip é do solaris, peguei não sei onde...) e me diz se
o socket na 2002 está ok?

#!/bin/sh
PATH=$PATH:/usr/openwin/bin:/opt/csw/OpenOffice.org/program/;export PATH

Xvfb :5 -dev vfb screen 0 800x600x16  -pn &
#Storing pid for shutdown script
echo $! > xvfb.pid

DISPLAY=:5;export DISPLAY
echo "Screen is now: $DISPLAY"
echo "Launching Open Office in headless mode"
soffice -display :5 -accept="socket,host=localhost,port=2002;urp;" &
#Storing pid for shutdown script
echo $! > soffice.pid


bye

gilnei

PS: Cara olhando aquele link que tu passaste achei resposta para uma coisa que eu queria há algum tempo e não tive tempo de procurar em detalhes "Replacing the python runtime
with your system's python installation"... muito 10... valeu mesmo!!!

Patrick Espake wrote:
Gilnei,

Obrigado pela resposta.

Mudei a linha:
soffice -accept="socket,host=127.0.0.1,port=2002;urp;OpenOffice.ServiceManager"
-norestore -headless -invisible -display :25&

E no arquivo do Python oo.py:
ctx=resolver.resolve("uno:socket,host=127.0.0.1
,port=2002;urp;StarOffice.ComponentContext")

Mas mesmo assim continua ocorrendo o mesmo erro:
[EMAIL PROTECTED] program]# python oo.py
Traceback (most recent call last):
 File "oo3.py", line 13, in ?
   ctx=resolver.resolve("uno:socket,host=127.0.0.1
,port=2002;urp;StarOffice.ComponentContext")
uno.com.sun.star.uno.RuntimeException: URP-Bridge: disposed(tid=3)
Unexpected connection closure
[4]   Done                    soffice
-accept="socket,host=127.0.0.1,port=2002;urp;OpenOffice.ServiceManager"
-norestore -headless -invisible -display :25

Você tem alguma outra solução?

Eu estou desenvolvendo a aplicação de acordo com as especificações contidas
no site do OpenOffice.org -
http://udk.openoffice.org/python/python-bridge.html

Obrigado.
Abraços.

Em 15/05/07, Gilnei M. Oliveira <[EMAIL PROTECTED]> escreveu:

- Troque localhost por 127.0.0.1

Patrick Espake wrote:
> Problemas integração Python com OpenOffice.org (Python-UNO
> bridge)-converter
> odt2pdf
>
> Estou tendo problemas para integrar o Python com OpenOffice.org, estou
> desenvolvendo uma aplicação em Python que utiliza algumas API's do
> OpenOffice.org para converter um documento .ODT em PDF. Consegui fazer
> funcionar perfeitamente em ambiente Windows, mas no Linux não funciona
de
> jeito nenhum. Instale no Linux o OpenOffice.org completo, inclusive com
o
> pacote de componentes Python-UNO bridge.
>
> No Linux estou fazendo os seguintes passos:
>
> Xvfb -screen scrn 800x600x16 :25 &
>
> soffice
> -accept="socket,host=localhost,port=2002;urp;OpenOffice.ServiceManager"
> -norestore -headless -invisible -display :25&
>
> [...]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Responder a