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

OO as service?

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


Joined: 15 Sep 2003
Posts: 14

PostPosted: Wed Oct 01, 2003 12:51 am    Post subject: OO as service? Reply with quote

Hi, is it possible to start an oo-server instance without being logged in? I want to have an server to print oo-documents by sending only the link to the dokument. The server should be abe to open the document and produce a PDF-file then.
Everyone experience with starting oo as process (service)?

Ingo
Back to top
View user's profile Send private message
meadows_p
Newbie
Newbie


Joined: 28 Jul 2003
Posts: 3

PostPosted: Wed Oct 01, 2003 1:17 am    Post subject: Yes Reply with quote

Yes this is definately do-able, read this bit of the documentation

http://api.openoffice.org/docs/DevelopersGuide/FirstSteps/FirstSteps.htm#1+3+3+3+Make+the+office+listen

which tells you how to start it as a service, and after that it's probably a good idea to read the rest of the document as well, download the SDK and look at the TextDocuments.java (I think it's called) example program.
Back to top
View user's profile Send private message
Pueppchen
General User
General User


Joined: 15 Sep 2003
Posts: 14

PostPosted: Wed Oct 01, 2003 1:27 am    Post subject: Reply with quote

thanks for the quick help, but:
maybe i didn't make it clear: this documentation is just for make oo listening. but doesn't say anything about starting oo as daemon. i try to start oo in listening mode with 'startproc ...' but it's not working. if you do like in the documentation, you have to login first and you can start oo in listening mode then. i want to start oo as daemon while linux is booting. and i don't want to login because oo should run on a server.

ingo
Back to top
View user's profile Send private message
meadows_p
Newbie
Newbie


Joined: 28 Jul 2003
Posts: 3

PostPosted: Wed Oct 01, 2003 1:40 am    Post subject: Right, didn't understand that Reply with quote

Sorry, I didn't see that you meant that and I don't know how you would do that. I'm currently OOo on a dedicated Win2000 server with a samba shared drive to the main linux web server. The web server copies the templates to the shared drive, communicates with OOo via UNO and get's it to save PDF's back to this shared drive.

Due to the nature of windows, we have to be logged in as a user so I wouldn't know how to set it running as a daemon.
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed Oct 01, 2003 5:51 am    Post subject: Reply with quote

Here is a similar question I answered earlier.

http://www.oooforum.org/forum/viewtopic.php?t=2707

Do you understand what I mean about opening the document with the Hidden flag?

Code:

oDoc = StarDesktop.loadComponentFromUrl( ....., "_blank", 0,_
   Array(  MakePropertyValue( "Hidden", True ) ) )


[for the definition of the MakePropertyValue function, see either my sig below, or other posts I've made here in Macros and API. Or you can dimension an array with one element of a com.sun.star.beans.PropertyValue, initialize its Name and Value, and pass in that array instead of an anonymous array using Array()]

On Linux, is there any reason you cannot copy one of your system's service initialization scripts, and make it run soffice with the -invisible option? The "stop" option to the script would need to be able to shut it down nicely. So that you can say...

rcOOoservice start | stop | restart | reload | status

When you start the service, you might need an X window server. I think there is a server that runs without a physical display, simply creating a bitmap in memory, but otherwise, a true X server. A similar server would be the VNC server. It is a true X server. Draws to a bitmap in memory. But, you can remote connect to it if you need to see what that bitmap currently looks like.

If you DON'T use the -invisible option, but pre-set the DISPLAY environment variable, I think you could do something like this....

vncserver # start vnc as display :99 (I'm too lazy to read the man page)
export DISPLAY=:99
soffice -accept .....blah..blah....

Perhaps the biggest unanswered question is how to nicely make OOo terminate?
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Wed Oct 01, 2003 8:15 am    Post subject: Reply with quote

Here is some additional information which might be useful.

http://www.openoffice.org/files/documents/25/60/Command_line_arguments_in_OpenOffice.html

Something else useful for the Windows version, type...

soffice -help

and a dialog box pops up showing command line options.

Go to this page...

http://framework.openoffice.org/servlets/ProjectDocumentList

Scroll down to "The Office Headless Mode".
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Mon Nov 17, 2003 11:08 am    Post subject: Reply with quote

It is definitely possible to run OOo using VNC as an X server so that everything is done off screen. An X server is required, but since VNC is the X server, it can all be done "in the background" without using an X server that displays something on the hardware monitor of the machine. See this....

http://www.oooforum.org/forum/viewtopic.php?p=14448#14448
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Sat Jan 17, 2004 2:19 pm    Post subject: Reply with quote

Above, two posts, I said ...
Dannyb wrote:
Go to this web site.... ..... Scroll down to "The Office Headless Mode".


That doc has been moved here...
http://framework.openoffice.org/servlets/ProjectDocumentList?folderID=151
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Thu Feb 12, 2004 8:32 pm    Post subject: Reply with quote

See these for running OOo as an NT service.

http://api.openoffice.org/servlets/ReadMsg?msgId=863018&listName=dev

http://www.techeez.com/windows_tips/service_under_nt.htm
_________________
Want to make OOo Drawings like the colored flower design to the left?
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