To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=48258
                  Issue #:|48258
                  Summary:|error connecting to OOo socket without gnome
                Component:|framework
                  Version:|680m95
                 Platform:|All
                      URL:|
               OS/Version:|Linux
                   Status:|UNCONFIRMED
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|DEFECT
                 Priority:|P3
             Subcomponent:|code
              Assigned to:|tm
              Reported by:|mnasato





------- Additional comments from [EMAIL PROTECTED] Wed Apr 27 03:45:38 -0700 
2005 -------
I am trying to perform some document conversions using automation. They works
fine fine with OOo 1.1. I start OOo with

  soffice -headless -accept="socket,port=8100;urp;"

and connect to it from Java (but for testing purposes I also wrote a Python
script pasted below)

The problem: from my X session everything was working fine. Then I tried to run
OOo in a Xvfb server, and the connection attempt produced the following error on
the console where OOo was running

  Xlib: unexpected async reply (sequence 0x???)

(where the sequence code varies) and the client program hanged.

Then I discovered that the same error occurs in a regular (not Xvfb) X server as
well if Gnome is not running.

So I tried starting gnome-session inside Xvfb prior to OOo, and it worked.

After some more attempts, it seems that only nautilus is required, not the whole
gnome-session.

So the test results are as follow:

start Xvfb, start OOo, run conversion script: failure
start Xvfb, start nautilus, start OOo, run conversion: success

additionally

start Xvfb, start nautilus, start OOo, stop nautilus (--quit), run conversion:
success

My guess is that nautilus initialises some bonobo component required by OOo, but
I could not find exactly which one.

System: tested on both Fedora Core 3 and CentOS 3.3

OOo is the RPM version downloaded from
http://www.mirror.ac.uk/mirror/sunsite.dk/openoffice/developer/680_m95/OOo_1.9.95_LinuxIntel_install.tar.gz

1.9.93 had the same problem.

Using the OOo GUI works fine without Gnome. But connecting to a OOo connection
fails without Gnome even without the -headless switch.

Below the python script used for testing.

--- file: ooo2pdf.py ---
import uno
from unohelper import absolutize
from os import getcwd
from sys import argv, exit
from com.sun.star.beans import PropertyValue
from com.sun.star.io import IOException, XOutputStream

def prop(name, value):
    return PropertyValue(name, 0, value, 0)

input = absolutize('file://'+ getcwd(), argv[1])
output = absolutize('file://'+ getcwd(), argv[2])

localContext = uno.getComponentContext()
resolver =
localContext.ServiceManager.createInstanceWithContext('com.sun.star.bridge.UnoUrlResolver',
localContext)
context =
resolver.resolve('uno:socket,host=localhost,port=8100;urp;StarOffice.ComponentContext')
serviceManager = context.ServiceManager
desktop = serviceManager.createInstanceWithContext('com.sun.star.frame.Desktop',
context)
document = desktop.loadComponentFromURL(input, '_blank', 0, (prop('Hidden', 
True),))
document.storeToURL(output, (prop('FilterName', "writer_pdf_Export"),))
document.dispose()

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
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]

Reply via email to