OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

x11 xvfb and ooo running headlessly not working?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
ptomsic
Newbie
Newbie


Joined: 13 Jan 2004
Posts: 4

PostPosted: Wed Jan 21, 2004 8:38 pm    Post subject: x11 xvfb and ooo running headlessly not working? Reply with quote

I'm trying to run ooo headlessly as a server listening on a port.
I've tried the following on a solaris box:

Xvfb :1 -screen scrn 800x600x32 &
/opt/OpenOffice.org1.1.0/program/soffice -headless -invisible -display :1 &

I also added the following to
share/registry/data/org/openoffice/Setup.xcu
<node oor:name="Office"/>
<prop oor:name="ooSetupConnectionURL" oor:type="xs:string">
  <value>socket,host=localhost,port=8100;urp;</value>
</prop>


The terminal session pauses a few seconds then does this:
[2]+ Done /opt/OpenOfffice1.1.0/program/soffice

and it's not in the process list (ps -elf | grep soffice) nor is it running (netstat -na)

any thoughts or help would be greatly appreciated .

is there a log or something that would reveal what's going wrong?
Back to top
View user's profile Send private message
jbotte
Power User
Power User


Joined: 27 Jan 2004
Posts: 57
Location: NC, USA

PostPosted: Mon Feb 23, 2004 10:52 am    Post subject: Xvfb issues... Reply with quote

I'm using Linux, but try the following to get up and running quickly:

1. Move your .Xauthority file to another name in your home directory. Note: Your mileage may vary if you are in a networked environment, it might break access for you to other machines' X servers... if it does, just restore the file after your test.

2. Create an /etc/X<n>.hosts file (where <n> is the server number that Xvfb will be initialized with, e.g. Xvfb :1 ... would look for an /etc/X1.hosts file ... each server has their own). Put the IP address or fully qualified domain name of the host you want to connect from in that file. Putting localhost in is useful as well. One entry per line (see

3. Launch the Xvfb server:
Code:
nohup /usr/X11R6/bin/Xvfb :1 -fbdir <directory>

or
Code:
nohup /usr/X11R6/bin/Xvfb :1 -screen 0 800x600x32 -fbdir <directory>

Where directory is a directory that the user who launched Xvfb has write access to so they can create the frame buffer as a memory mapped file (this doesn't eat up valuable virtual memory the same way as not using it... plus you can use xwud, in theory, to look at the current state of the framebuffer display). Note: If you do not specify a "-screen", it's equivalent to specifying "-screen 0 1280x1024x8"... Also, the smaller you specify your screen and the smaller your pixel specification, the less disk space the framebuffer file will occupy.

You should then be able to run OOo using that X server:
Code:
soffice -headless -display :1.0 "macro:///spam(hello)"


Note: The display number (e.g. :1) you give to Xvfb has to be unique on your host. If the "regular" X server is running, it's almost always :0, so :1 is usually safe for Xvfb, but any value should do... one per X server.

I'm going to post a more elegant solution for this problem soon (that better takes into account the problem with the .Xauthority files), but the above worked for me when I was in a pinch.
Back to top
View user's profile Send private message
jbotte
Power User
Power User


Joined: 27 Jan 2004
Posts: 57
Location: NC, USA

PostPosted: Wed Jul 14, 2004 11:34 am    Post subject: Just in case anyone wanders across this thread... Reply with quote

FYI,

I have posted a comprehensive method for using a "headless" OOo with Linux. This technique can probably be adapted to Solaris and other Un*x OSs.

The post is at: http://www.oooforum.org/forum/viewtopic.php?t=6691
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group