Starting in Listening Mode

From Apache OpenOffice Wiki
< Documentation‎ | DevGuide
Revision as of 09:15, 23 June 2008 by Jirong (Talk | contribs)

Jump to: navigation, search

zh:Zh/Documentation/DevGuide/ProUNO/Starting in Listening Mode

Most examples in this developers guide connect to a running and perform API calls, which are then executed in By default, the office does not listen on a resource for security reasons. This makes it necessary to make listen on an interprocess connection resource, for example, a socket. Currently this can be done in two ways:

  • Start the office with an additional parameter:
 soffice -accept=socket,host=0,port=2002;urp;

This string has to be quoted on unix shells, because the semicolon ';' is interpreted by the shells

  • Place the same string without '-accept=' into a configuration file. You can edit the file
and replace the tag
  <prop oor:name="ooSetupConnectionURL"/>


  <prop oor:name="ooSetupConnectionURL">

If the tag is not present, add it within the tag

  <node oor:name="Office"/>

This change affects the whole installation. If you want to configure it for a certain user in a network installation, add the same tag within the node <node oor:name="Office/> to the file Setup.xcu in the user dependent configuration directory <OfficePath>/user/registry/data/org/openoffice/

Choose the procedure that suits your requirements and launch in listening mode now. Check if it is listening by calling netstat -a or -na on the command-line. An output similar to the following shows that the office is listening:

 TCP <Hostname>:8100 <Fully qualified hostname>: 0 Listening

If you use the -n option, netstat displays addresses and port numbers in numerical form. This is sometimes useful on UNIX systems where it is possible to assign logical names to ports.

If the office is not listening, it probably was not started with the proper connection URL parameter. Check the Setup.xcu file or your command-line for typing errors and try again.


The various parts of the connection URL will be discussed in the next section.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools