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

Start OpenOffice under different user account

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


Joined: 10 Aug 2004
Posts: 67

PostPosted: Thu Mar 23, 2006 12:26 pm    Post subject: Start OpenOffice under different user account Reply with quote

Hi there,

I am just wondering if anyone could show me how to start OpenOffice services under different user account.

Any help is great appreciated

Alan
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3532
Location: Hamburg, Germany

PostPosted: Thu Mar 23, 2006 1:19 pm    Post subject: Re: Start OpenOffice under different user account Reply with quote

wangxianlg wrote:
I am just wondering if anyone could show me how to start OpenOffice services under different user account.

For a *nix system you need a script that starts OOo. And inside that script before you start OOo you switch to a different user account through "su". I guess that should work. But before trying that you should ensure that the different user can start OOo, if you are logged in as that different user.

With kind regards
hol.sten
Back to top
View user's profile Send private message
wangxianlg
Power User
Power User


Joined: 10 Aug 2004
Posts: 67

PostPosted: Fri Mar 24, 2006 6:45 am    Post subject: Sample script Reply with quote

Hi there,

I am just wondering if you have the smaple script for Window or Unix I can look at it.

thanks

Alan
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3532
Location: Hamburg, Germany

PostPosted: Fri Mar 24, 2006 10:04 am    Post subject: Re: Sample script Reply with quote

wangxianlg wrote:
I am just wondering if you have the smaple script for Window or Unix I can look at it.


Code:
#! /bin/ksh

OOoCmd=/opt/openoffice.org2.0/program/soffice
OOoAcc="-accept=socket,port=8100,host=localhost\;urp;StarOffice.ServiceManager"
OOoPrm="-headless -norestore -display :1.0"

# Start Xvfb, if there is no X server available or remove the line
/usr/X/bin/Xvfb :1 -screen 0 800x600x16 -fbdir /var/tmp/tempfb &

# Start OOo
$OOoCmd $OOoAcc $OOoPrm

On *nix this should do the job.

With kind regards
hol.sten
Back to top
View user's profile Send private message
wangxianlg
Power User
Power User


Joined: 10 Aug 2004
Posts: 67

PostPosted: Fri Mar 24, 2006 10:20 am    Post subject: Reply with quote

Hi hol.sten,

How about Windows? Cause my web appllication is running on window IIS6.0.

Thanks

Alan
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3532
Location: Hamburg, Germany

PostPosted: Fri Mar 24, 2006 10:26 am    Post subject: Reply with quote

wangxianlg wrote:
How about Windows? Cause my web appllication is running on window IIS6.0.

I answered that already in this thread of yours http://www.oooforum.org/forum/viewtopic.phtml?t=33940. All you have to do is put the line in a *.bat file and set the PATH according to your system.

With kind regards
hol.sten
Back to top
View user's profile Send private message
wangxianlg
Power User
Power User


Joined: 10 Aug 2004
Posts: 67

PostPosted: Fri Mar 24, 2006 10:39 am    Post subject: Reply with quote

Hi hol.sten,

I just saw that one. Thanks.

I know OpenOffice can't handle multiple instances at same time. I am just wondering if there is any way to limited only one instance of OpenOffice running at a time. I did test on my web application while two users request OpenOffice at same time and OpenOffice will totally mess up and leave the document unfinished.

Thanks

Alan
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3532
Location: Hamburg, Germany

PostPosted: Fri Mar 24, 2006 10:48 am    Post subject: Reply with quote

wangxianlg wrote:
I know OpenOffice can't handle multiple instances at same time. I am just wondering if there is any way to limited only one instance of OpenOffice running at a time.

This question has also been discussed a lot in this forum. There is no option of OOo that can handle this. You have to handle this topic by yourself with some extra Java code. Simply speaking: Offer one synchronized method to handle the OOo requests one at a time.

For example read this:
- http://www.oooforum.org/forum/viewtopic.phtml?t=19095&highlight=serialize
- http://www.oooforum.org/forum/viewtopic.phtml?t=20343&highlight=serialize
- http://www.oooforum.org/forum/viewtopic.phtml?t=31213

With kind regards
hol.sten
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