Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Starting NeoOffice from shell
Starting NeoOffice from shell
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
Phil H.
Guest





PostPosted: Sat Dec 31, 2005 5:40 pm    Post subject: Starting NeoOffice from shell

Is there a way to start NeoOffice from a shell and pass startup switches?

This works in starting NeoOffice:

open -a "/applications/NeoOfficeJ.app"

but any switches included are treated like a file to open.

This sort of works:

"/applications/NeoOfficeJ.app/Contents/program/soffice.bin" -n tempfile

but it starts soffice.bin instead of NeoOffice and doesn't return control to the shell until soffice has exited.

Thanks for any suggestions.

-Phil
Back to top
jjmckenzie51
The Anomaly


Joined: Apr 01, 2005
Posts: 1055
Location: Southeastern Arizona

PostPosted: Sat Dec 31, 2005 6:13 pm    Post subject: Re: Starting NeoOffice from shell

Phil H. wrote:
Is there a way to start NeoOffice from a shell and pass startup switches?

This works in starting NeoOffice:

open -a "/applications/NeoOfficeJ.app"

but any switches included are treated like a file to open.

This sort of works:

"/applications/NeoOfficeJ.app/Contents/program/soffice.bin" -n tempfile

but it starts soffice.bin instead of NeoOffice and doesn't return control to the shell until soffice has exited.


I don't know of any commands that will start the program but if you want to return control to the shell immediately after starting soffice.bin append an amperstand (&) to the end of your command. This will start soffice.bin as a background task.

James
Back to top
barefootguru
Agent


Joined: Dec 28, 2005
Posts: 16
Location: Aotearoa New Zealand

PostPosted: Thu Jan 12, 2006 10:04 pm    Post subject: Re: Starting NeoOffice from shell

Phil H. wrote:
Is there a way to start NeoOffice from a shell and pass startup switches?

This works in starting NeoOffice:

open -a "/applications/NeoOfficeJ.app"

but any switches included are treated like a file to open.

This sort of works:

"/applications/NeoOfficeJ.app/Contents/program/soffice.bin" -n tempfile

but it starts soffice.bin instead of NeoOffice and doesn't return control to the shell until soffice has exited.


First, the open can be shortened to 'open -a neooffice', but this isn't going to help, as there's no mention of passing switches on the open man page.

The second option sounds like you're on the right path to me (although I'm only just in my depth here). soffice.bin is what normally gets executed, the only difference should be the name in the Dock / Application Switcher (but you may end up with 2 copies of NO running if you then double-click on a doc).

Personally I'd look for a different solution--what does the switch do?
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Sat Jan 14, 2006 12:52 pm    Post subject: Re: Starting NeoOffice from shell

Phil H. wrote:

"/applications/NeoOfficeJ.app/Contents/program/soffice.bin" -n tempfile


First off, that is the correct way to go at it. soffice.bin is the actual guts of the application. The name may be off in the Dock, but that's dependent on the version of Mac OS X and whether it looks inside the bundle properly.

It won't exit until soffice.bin itself exits. Simple workaround...just background the process in your shell command Smile

Code:

/Applications/NeoOfficeJ.app/Contents/program/soffice.bin -n tempfile &


Note also that Neo (like OOo) is "smart" and won't launch more than one instance of itself. If you pass multiple requests via soffice.bin, the requests will all get handled by a single application instnce.

ed
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Sat Jan 14, 2006 12:53 pm    Post subject:

(note: the backgrounding is done by the trailing ampersand at the end of the command. You can background any commandline execution this way).

ed
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
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
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.